FlutterUsbWrite constructor

FlutterUsbWrite()

Initializes the plugin and starts listening for potential platform events.

Implementation

factory FlutterUsbWrite() {
  if (_instance == null) {
    final MethodChannel methodChannel =
        const MethodChannel('flutter_usb_write/methods');
    final EventChannel eventChannel =
        const EventChannel('flutter_usb_write/events');
    _instance = FlutterUsbWrite.private(methodChannel, eventChannel);
  }
  return _instance!;
}