DeviceEvent constructor

DeviceEvent({
  1. DeviceEventKind? kind,
  2. String? deviceId,
  3. String? osName,
  4. String? osVersion,
  5. String? model,
  6. String? error,
  7. String? property,
  8. String? newValue,
  9. String? oldValue,
  10. double? batteryLevel,
  11. bool? isCharging,
  12. String? thermalState,
  13. bool? isConnected,
  14. String? connectionType,
})

Implementation

factory DeviceEvent({
  DeviceEventKind? kind,
  $core.String? deviceId,
  $core.String? osName,
  $core.String? osVersion,
  $core.String? model,
  $core.String? error,
  $core.String? property,
  $core.String? newValue,
  $core.String? oldValue,
  $core.double? batteryLevel,
  $core.bool? isCharging,
  $core.String? thermalState,
  $core.bool? isConnected,
  $core.String? connectionType,
}) {
  final result = create();
  if (kind != null) result.kind = kind;
  if (deviceId != null) result.deviceId = deviceId;
  if (osName != null) result.osName = osName;
  if (osVersion != null) result.osVersion = osVersion;
  if (model != null) result.model = model;
  if (error != null) result.error = error;
  if (property != null) result.property = property;
  if (newValue != null) result.newValue = newValue;
  if (oldValue != null) result.oldValue = oldValue;
  if (batteryLevel != null) result.batteryLevel = batteryLevel;
  if (isCharging != null) result.isCharging = isCharging;
  if (thermalState != null) result.thermalState = thermalState;
  if (isConnected != null) result.isConnected = isConnected;
  if (connectionType != null) result.connectionType = connectionType;
  return result;
}