initialize method

Must be called before you can use any function from this class. _callback This will be invoked everytime sendTransaction is called.

Implementation

PosUsbOTGConnector initialize(PosUsbConnectionCallback callback) {
  if (!Platform.isAndroid) {
    throw PosConnectorException(PosConnectorException.unsupportedPlatform,
        "Only Android is supported.");
  }
  _callback = callback;
  _abaPosSdkFlutterPlugin = _abaPosSdkFlutterPlugin ?? AbaPosSdkFlutter();
  _plugin = _plugin ?? FlutterSerialCommunication();
  _getConnectedUsb();
  _registerUsbAttachedOrDetachedEvent();
  return this;
}