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(json['file_type'] as Map<String, dynamic>?),
    networkType:
        NetworkType.fromJson(json['network_type'] as Map<String, dynamic>?)!,
    sentBytes: (json['sent_bytes'] as int?) ?? 0,
    receivedBytes: (json['received_bytes'] as int?) ?? 0,
  );
}