fromMap static method

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

Construct from Map.

Implementation

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