disconnect method
Implementation
Future<void> disconnect(Printer device) async {
if (device.connectionType == ConnectionType.BLE) {
try {
final bt = BluetoothDevice.fromId(device.address!);
await bt.disconnect();
} catch (e) {
log('Failed to disconnect device');
}
}
}