connectionState property

  1. @override
Future<BleConnectionState> get connectionState
override

Only BLE printers are known to the BLE stack; USB and network printers report isConnected instead of querying it with a non-BLE address.

Implementation

@override
Future<BleConnectionState> get connectionState =>
    connectionType == ConnectionType.BLE
    ? super.connectionState
    : Future.value(
        isConnected ?? false
            ? BleConnectionState.connected
            : BleConnectionState.disconnected,
      );