fromMap static method

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

Construct from Map.

Implementation

static CallStateDiscarded? 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 reason = CallDiscardReason.fromMap(_map['reason'])!;
  var need_rating = _map['need_rating']! as bool;
  var need_debug_information = _map['need_debug_information']! as bool;
  var need_log = _map['need_log']! as bool;
  return CallStateDiscarded(
    extra: extra,
    clientId: clientId,
    reason: reason,
    need_rating: need_rating,
    need_debug_information: need_debug_information,
    need_log: need_log,
  );
}