fromMap static method

Venue? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static Venue? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var location = Location.fromMap(_map['location'])!;
  var title = _map['title']! as String;
  var address = _map['address']! as String;
  var provider = _map['provider']! as String;
  var id = _map['id']! as String;
  var type = _map['type']! as String;
  return Venue(
    extra: extra,
    clientId: clientId,
    location: location,
    title: title,
    address: address,
    provider: provider,
    id: id,
    type: type,
  );
}