DeviceInfo constructor

DeviceInfo({
  1. String? deviceModel,
  2. Platform? platform,
  3. String? osVersion,
  4. FormFactor? formFactor,
  5. String? architecture,
  6. String? chipName,
  7. Int64? totalMemoryBytes,
  8. Int64? availableMemoryBytes,
  9. bool? hasNpu,
  10. int? npuCores,
  11. String? gpuFamily,
  12. double? batteryLevel,
  13. BatteryState? batteryState,
  14. bool? isLowPowerMode,
  15. int? coreCount,
  16. int? performanceCores,
  17. String? deviceFingerprint,
  18. Iterable<MapEntry<String, String>>? platformExtras,
})

Implementation

factory DeviceInfo({
  $core.String? deviceModel,
  Platform? platform,
  $core.String? osVersion,
  FormFactor? formFactor,
  $core.String? architecture,
  $core.String? chipName,
  $fixnum.Int64? totalMemoryBytes,
  $fixnum.Int64? availableMemoryBytes,
  $core.bool? hasNpu,
  $core.int? npuCores,
  $core.String? gpuFamily,
  $core.double? batteryLevel,
  BatteryState? batteryState,
  $core.bool? isLowPowerMode,
  $core.int? coreCount,
  $core.int? performanceCores,
  $core.String? deviceFingerprint,
  $core.Iterable<$core.MapEntry<$core.String, $core.String>>? platformExtras,
}) {
  final result = create();
  if (deviceModel != null) result.deviceModel = deviceModel;
  if (platform != null) result.platform = platform;
  if (osVersion != null) result.osVersion = osVersion;
  if (formFactor != null) result.formFactor = formFactor;
  if (architecture != null) result.architecture = architecture;
  if (chipName != null) result.chipName = chipName;
  if (totalMemoryBytes != null) result.totalMemoryBytes = totalMemoryBytes;
  if (availableMemoryBytes != null)
    result.availableMemoryBytes = availableMemoryBytes;
  if (hasNpu != null) result.hasNpu = hasNpu;
  if (npuCores != null) result.npuCores = npuCores;
  if (gpuFamily != null) result.gpuFamily = gpuFamily;
  if (batteryLevel != null) result.batteryLevel = batteryLevel;
  if (batteryState != null) result.batteryState = batteryState;
  if (isLowPowerMode != null) result.isLowPowerMode = isLowPowerMode;
  if (coreCount != null) result.coreCount = coreCount;
  if (performanceCores != null) result.performanceCores = performanceCores;
  if (deviceFingerprint != null) result.deviceFingerprint = deviceFingerprint;
  if (platformExtras != null)
    result.platformExtras.addEntries(platformExtras);
  return result;
}