fromMap static method

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

Construct from Map.

Implementation

static MessageProximityAlertTriggered? 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 traveler_id = MessageSender.fromMap(_map['traveler_id'])!;
  var watcher_id = MessageSender.fromMap(_map['watcher_id'])!;
  var distance = _map['distance']! as int;
  return MessageProximityAlertTriggered(
    extra: extra,
    clientId: clientId,
    traveler_id: traveler_id,
    watcher_id: watcher_id,
    distance: distance,
  );
}