isDisconnecting method
Callback when the physical device is disconnected due to e.g., a temporary loss of Bluetooth connection.
All sampling on this device will be stopped, but the sampling will be marked to be restarted (via restart) when the device is reconnected, e.g., when the Bluetooth connection is re-established.
Implementation
@nonVirtual
Future<void> isDisconnecting() async {
info('$runtimeType - Was disconnected from device of type: $typeName.');
stop(shouldBeResumed: true);
status = DeviceStatus.disconnected;
}