NetworkSpeedSample.fromMap constructor

NetworkSpeedSample.fromMap(
  1. Map<Object?, Object?> map
)

Creates a NetworkSpeedSample from a map returned by the native platform.

Implementation

factory NetworkSpeedSample.fromMap(Map<Object?, Object?> map) {
  return NetworkSpeedSample(
    timestampMillis: _readInt(map, 'timestampMillis'),
    rxBytesPerSecond: _readInt(map, 'rxBytesPerSecond'),
    txBytesPerSecond: _readInt(map, 'txBytesPerSecond'),
    rxKbps: _readDouble(map, 'rxKbps'),
    txKbps: _readDouble(map, 'txKbps'),
    totalRxBytes: _readInt(map, 'totalRxBytes'),
    totalTxBytes: _readInt(map, 'totalTxBytes'),
    isSupported: _readBool(map, 'isSupported'),
  );
}