vasReaderSessionBegin method

Future<void> vasReaderSessionBegin({
  1. required List<NfcVasCommandConfigurationIOS> configurations,
  2. required void didReceive(
    1. List<NfcVasResponseIOS> configurations
    ),
  3. void didBecomeActive()?,
  4. void didInvalidateWithError(
    1. NfcReaderSessionErrorIOS error
    )?,
  5. String? alertMessage,
})

DOC:

Implementation

Future<void> vasReaderSessionBegin({
  required List<NfcVasCommandConfigurationIOS> configurations,
  required void Function(List<NfcVasResponseIOS> configurations) didReceive,
  void Function()? didBecomeActive,
  void Function(NfcReaderSessionErrorIOS error)? didInvalidateWithError,
  String? alertMessage,
}) {
  _vasReaderSessionDidBecomeActive = didBecomeActive;
  _vasReaderSessionDidInvalidateWithError = didInvalidateWithError;
  _vasReaderSessionDidReceive = didReceive;
  return hostApi.vasReaderSessionBegin(
    configurations: configurations
        .map((e) => PigeonNfcVasCommandConfiguration(
              mode: PigeonNfcVasCommandConfigurationMode.values.byName(
                e.mode.name,
              ),
              passIdentifier: e.passIdentifier,
              url: e.url?.toString(),
            ))
        .toList(),
    alertMessage: alertMessage,
  );
}