vasSessionBegin method

Future<void> vasSessionBegin({
  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,
})

Implementation

Future<void> vasSessionBegin({
  required List<NfcVasCommandConfigurationIos> configurations,
  required void Function(List<NfcVasResponseIos> configurations) didReceive,
  void Function()? didBecomeActive,
  void Function(NfcReaderSessionErrorIos error)? didInvalidateWithError,
  String? alertMessage,
}) {
  _vasSessionDidBecomeActive = didBecomeActive;
  _vasSessionDidInvalidateWithError = didInvalidateWithError;
  _vasSessionDidReceive = didReceive;
  return hostApi.vasSessionBegin(
    configurations: configurations
        .map(
          (e) => NfcVasCommandConfigurationPigeon(
            mode: NfcVasCommandConfigurationModePigeon.values.byName(
              e.mode.name,
            ),
            passIdentifier: e.passIdentifier,
            url: e.url?.toString(),
          ),
        )
        .toList(),
    alertMessage: alertMessage,
  );
}