checkConnected method

Future<bool> checkConnected()

connect let you connect to a bluetooth printer

Implementation

Future<bool> checkConnected() async {
  try {
    if (Platform.isAndroid || Platform.isIOS) {
      var device = themal.BluetoothDevice(printer.name, printer.address);
      return (await bluetooth.isDeviceConnected(device)) ?? false;
    }
  } catch (e) {}

  return Future<bool>.value(false);
}