DevicePatterns extension
Adds pattern-matching-related methods to Device.
- on
Methods
-
map<
TResult extends Object?> (TResult $default(_Device value)) → TResult -
Available on Device, provided by the DevicePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Device value)?) → TResult? -
Available on Device, provided by the DevicePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Device value)?, {required TResult orElse()}) → TResult -
Available on Device, provided by the DevicePatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String name, String ident, String? flespiToken, String? modelId, Model? model, String? protocolId, InboundProtocol? protocol, Map< String, dynamic> ? additionalFields, String? qrCode, String? linkQr, List<DeviceCommand> ? commands, List<Access> ? access, DeviceTelemetry? telemetry, String? visionProfileId, VisionProfile? visionProfile, PhoneNumber? phone, ModbusConfig? modbus, bool? isSuspended, HwModel? hwModel, String? hwModelId, String? macAddress, Map<String, dynamic> ? configParams, Duration? visionCaptureThreshold, List<Device> ? peripherals, String? localIpAddress)?, {required TResult orElse()}) → TResult -
Available on Device, provided by the DevicePatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> (TResult $default(String id, String name, String ident, String? flespiToken, String? modelId, Model? model, String? protocolId, InboundProtocol? protocol, Map< String, dynamic> ? additionalFields, String? qrCode, String? linkQr, List<DeviceCommand> ? commands, List<Access> ? access, DeviceTelemetry? telemetry, String? visionProfileId, VisionProfile? visionProfile, PhoneNumber? phone, ModbusConfig? modbus, bool? isSuspended, HwModel? hwModel, String? hwModelId, String? macAddress, Map<String, dynamic> ? configParams, Duration? visionCaptureThreshold, List<Device> ? peripherals, String? localIpAddress)) → TResult -
Available on Device, provided by the DevicePatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String name, String ident, String? flespiToken, String? modelId, Model? model, String? protocolId, InboundProtocol? protocol, Map< String, dynamic> ? additionalFields, String? qrCode, String? linkQr, List<DeviceCommand> ? commands, List<Access> ? access, DeviceTelemetry? telemetry, String? visionProfileId, VisionProfile? visionProfile, PhoneNumber? phone, ModbusConfig? modbus, bool? isSuspended, HwModel? hwModel, String? hwModelId, String? macAddress, Map<String, dynamic> ? configParams, Duration? visionCaptureThreshold, List<Device> ? peripherals, String? localIpAddress)?) → TResult? -
Available on Device, provided by the DevicePatterns extension
A variant ofwhenthat fallback to returningnull