onDeviceConnectionStateChanged method

  1. @override
void onDeviceConnectionStateChanged({
  1. required IBleDevice device,
  2. required BleConnectionState newGattState,
})
override

Gets called when there is a change in the state of the device connection.

Implementation

@override
void onDeviceConnectionStateChanged(
    {required IBleDevice device, required BleConnectionState newGattState}) {
  BleDeviceConnectionStateChangedEvent event =
      BleDeviceConnectionStateChangedEvent(
          device: device, newState: newGattState);
  _deviceFsm?.handleEvent(event: event);
}