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 Exception

A 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.

ParameterTypeKindDefault
codeBluetoothErrorCodepositional
messageStringpositional
causeObject?optional positional

Properties

BluetoothError.code

final BluetoothErrorCode code

The category of this failure.

BluetoothError.message

final String message

A short description of the failure.

BluetoothError.cause

final Object? cause

The error that caused this failure, when available.

BluetoothErrorCode

enum BluetoothErrorCode

A Bluetooth operation's failure category.

Values

BluetoothErrorCode.permissionDenied

static const BluetoothErrorCode permissionDenied

The app does not have permission to use Bluetooth.

BluetoothErrorCode.poweredOff

static const BluetoothErrorCode poweredOff

Bluetooth is turned off.

BluetoothErrorCode.unsupported

static const BluetoothErrorCode unsupported

This device does not support Bluetooth LE.

BluetoothErrorCode.scanFailed

static const BluetoothErrorCode scanFailed

Device scanning failed.

BluetoothErrorCode.connectionFailed

static const BluetoothErrorCode connectionFailed

A device connection failed.

BluetoothErrorCode.pairingRequired

static const BluetoothErrorCode pairingRequired

The device must be paired before it can be used.

BluetoothErrorCode.discoveryFailed

static const BluetoothErrorCode discoveryFailed

Bluetooth service discovery failed.

BluetoothErrorCode.deviceError

static const BluetoothErrorCode deviceError

The device reported an error.

BluetoothErrorCode.frameInvalid

static const BluetoothErrorCode frameInvalid

A device frame was invalid.

BluetoothErrorCode.measurementFailed

static const BluetoothErrorCode measurementFailed

A device measurement could not be decoded.

BluetoothErrorCode.deviceNotFound

static const BluetoothErrorCode deviceNotFound

The requested device has not been discovered.

BluetoothErrorCode.runtimeDisposed

static const BluetoothErrorCode runtimeDisposed

The runtime has already been disposed.

BluetoothErrorCode.saveFailed

static const BluetoothErrorCode saveFailed

A measurement could not be saved.

BluetoothErrorCode.unknown

static const BluetoothErrorCode unknown

The failure does not fit another category.

Constructors

BluetoothErrorCode.new

BluetoothErrorCode(String value)

Creates a Bluetooth failure category.

ParameterTypeKindDefault
valueStringpositional

Properties

BluetoothErrorCode.value

final String value

The stable contract value for this category.

asBluetoothError

BluetoothError asBluetoothError(Object error, BluetoothErrorCode code)

Converts error to a BluetoothError with the supplied fallback code.

ParameterTypeKindDefault
errorObjectpositional
codeBluetoothErrorCodepositional

Last updated on

On this page