fromMap static method

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

Construct from Map.

Implementation

static InputMessageLocation? 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 live_period = _map['live_period']! as int;
  var heading = _map['heading']! as int;
  var proximity_alert_radius = _map['proximity_alert_radius']! as int;
  return InputMessageLocation(
    extra: extra,
    clientId: clientId,
    location: location,
    live_period: live_period,
    heading: heading,
    proximity_alert_radius: proximity_alert_radius,
  );
}