closePort method

  1. @override
Future<String?> closePort()
override

close the opened port which you have opened from openPort this method At a time you can't opened two ports Close the previous to open the new

Implementation

@override
Future<String?> closePort() async {
  final version =
      await methodChannel.invokeMethod<String>('embeddedSerial/close');
  return version;
}