getAvailablePorts method

  1. @override
Future<List<String>?> getAvailablePorts()
override

Call the delegate availablePorts method to provide available serial ports on the device getAvailablePorts : return type List of String

Implementation

@override
Future<List<String>?> getAvailablePorts() async {
  List<String>? list = await methodChannel
      .invokeListMethod<String>('embeddedSerial/availablePorts');
  return list;
}