Errors
Generated reference for ovok_flutter: errors.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.27+7d4ccf0
BluetoothError
class BluetoothError implements ExceptionA failure reported by the Bluetooth runtime or one of its ports.
Constructors
BluetoothError.new
BluetoothError(
BluetoothErrorCode code,
String message, [
Object? cause,
])Creates a Bluetooth error with an optional underlying cause.
| Parameter | Type | Kind | Default |
|---|---|---|---|
code | BluetoothErrorCode | positional | |
message | String | positional | |
cause | Object? | optional positional |
Properties
BluetoothError.code
final BluetoothErrorCode codeThe category of this failure.
BluetoothError.message
final String messageA short description of the failure.
BluetoothError.cause
final Object? causeThe error that caused this failure, when available.
BluetoothErrorCode
enum BluetoothErrorCodeA Bluetooth operation's failure category.
Values
BluetoothErrorCode.permissionDenied
static const BluetoothErrorCode permissionDeniedThe app does not have permission to use Bluetooth.
BluetoothErrorCode.poweredOff
static const BluetoothErrorCode poweredOffBluetooth is turned off.
BluetoothErrorCode.unsupported
static const BluetoothErrorCode unsupportedThis device does not support Bluetooth LE.
BluetoothErrorCode.scanFailed
static const BluetoothErrorCode scanFailedDevice scanning failed.
BluetoothErrorCode.connectionFailed
static const BluetoothErrorCode connectionFailedA device connection failed.
BluetoothErrorCode.pairingRequired
static const BluetoothErrorCode pairingRequiredThe device must be paired before it can be used.
BluetoothErrorCode.discoveryFailed
static const BluetoothErrorCode discoveryFailedBluetooth service discovery failed.
BluetoothErrorCode.deviceError
static const BluetoothErrorCode deviceErrorThe device reported an error.
BluetoothErrorCode.frameInvalid
static const BluetoothErrorCode frameInvalidA device frame was invalid.
BluetoothErrorCode.measurementFailed
static const BluetoothErrorCode measurementFailedA device measurement could not be decoded.
BluetoothErrorCode.deviceNotFound
static const BluetoothErrorCode deviceNotFoundThe requested device has not been discovered.
BluetoothErrorCode.runtimeDisposed
static const BluetoothErrorCode runtimeDisposedThe runtime has already been disposed.
BluetoothErrorCode.saveFailed
static const BluetoothErrorCode saveFailedA measurement could not be saved.
BluetoothErrorCode.unknown
static const BluetoothErrorCode unknownThe failure does not fit another category.
Constructors
BluetoothErrorCode.new
BluetoothErrorCode(String value)Creates a Bluetooth failure category.
| Parameter | Type | Kind | Default |
|---|---|---|---|
value | String | positional |
Properties
BluetoothErrorCode.value
final String valueThe stable contract value for this category.
asBluetoothError
BluetoothError asBluetoothError(Object error, BluetoothErrorCode code)Converts error to a BluetoothError with the supplied fallback code.
| Parameter | Type | Kind | Default |
|---|---|---|---|
error | Object | positional | |
code | BluetoothErrorCode | positional |
Last updated on