initialize method

  1. @override
Future<void> initialize(
  1. ReaderConfig config
)
override

Initialize the SDK with POS-supplied configuration.

Must be called before any other method. Calling twice without an intervening teardown surfaces ReaderErrorCode.alreadyInitialized.

Implementation

@override
Future<void> initialize(ReaderConfig config) async {
  await _invoke<Object?>(
    MobileReaderChannels.initialize,
    <String, dynamic>{
      MobileReaderChannels.argConfig: config.toJson(),
    },
  );
}