copyWith method

  1. @override
NetworkStatisticsEntryFile copyWith({
  1. FileType? fileType()?,
  2. NetworkType? networkType,
  3. int? sentBytes,
  4. int? receivedBytes,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
NetworkStatisticsEntryFile copyWith({
  FileType? Function()? fileType,
  NetworkType? networkType,
  int? sentBytes,
  int? receivedBytes,
}) =>
    NetworkStatisticsEntryFile(
      fileType: fileType != null ? fileType() : this.fileType,
      networkType: networkType ?? this.networkType,
      sentBytes: sentBytes ?? this.sentBytes,
      receivedBytes: receivedBytes ?? this.receivedBytes,
    );