fromJson static method

NetworkStatisticsEntryFile? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static NetworkStatisticsEntryFile? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return NetworkStatisticsEntryFile(
    fileType: FileType.fromJson(tdMapFromJson(json['file_type'])),
    networkType: NetworkType.fromJson(tdMapFromJson(json['network_type'])),
    sentBytes: (json['sent_bytes'] as int?) ?? 0,
    receivedBytes: (json['received_bytes'] as int?) ?? 0,
  );
}