fromMap static method

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

Construct from Map.

Implementation

static NetworkStatisticsEntryCall? 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 network_type = NetworkType.fromMap(_map['network_type'])!;
  var sent_bytes = _map['sent_bytes']! as int;
  var received_bytes = _map['received_bytes']! as int;
  var duration = _map['duration']! as double;
  return NetworkStatisticsEntryCall(
    extra: extra,
    clientId: clientId,
    network_type: network_type,
    sent_bytes: sent_bytes,
    received_bytes: received_bytes,
    duration: duration,
  );
}