getConnectedDevice method

  1. @override
Future<Peripheral?> getConnectedDevice()
override

Gets the details of the currently connected printer.

Implementation

@override
Future<Peripheral?> getConnectedDevice() async {
  final result = await _channel.invokeMethod('getConnectedDevice');
  if (result == null) return null;
  return Peripheral.fromJson(Map<String, dynamic>.from(result));
}