errorCode property
Classification of the error. null on success and where the platform
reports no code at all: Windows, Linux and Web, and (usually) a
disconnect requested by the app. A code the plugin does not recognise
is BleShieldNativeErrorCode.unknownError, not null. Connection related
values:
- BleShieldNativeErrorCode.deviceDisconnected: the peripheral closed the
link (Apple
peripheralDisconnected; Android HCI 0x13,GATT_FAILURE) - BleShieldNativeErrorCode.connectionTimeout: link lost, supervision
timeout (Apple
connectionTimeout; Android HCI 0x08,GATT_CONNECTION_TIMEOUT) - BleShieldNativeErrorCode.connectionFailed: the attempt did not succeed
(Apple
connectionFailed; Android HCI 0x3E,GATT_ERROR,GATT_CONNECTION_CONGESTED) connectionLimitReached; Android HCI 0x09- BleShieldNativeErrorCode.connectionAlreadyExists: Android HCI 0x0B
- BleShieldNativeErrorCode.connectionRejected: Android HCI 0x0D-0x0F
- BleShieldNativeErrorCode.connectionTerminated: Android HCI 0x16
- BleShieldNativeErrorCode.unknownError: anything else
A connection attempt that never succeeds is always
BleShieldNativeErrorCode.connectionFailed: Apple reports it through
didFailToConnect; on Android it arrives as a disconnect, and the plugin
classifies it by whether the link had reached STATE_CONNECTED.
Implementation
final BleShieldNativeErrorCode? errorCode;