disconnect method

  1. @override
Future<void> disconnect({
  1. String? iosAlertMessage,
  2. String? iosErrorMessage,
})
override

/ Can throw ComProviderError.

Implementation

@override
Future<void> disconnect(
    {String? iosAlertMessage, String? iosErrorMessage}) async {
  if (isConnected()) {
    _log.debug("Disconnecting");
    try {
      _tag = null;
      return await FlutterNfcKit.finish(
        iosAlertMessage: iosAlertMessage, iosErrorMessage: iosErrorMessage);
    } on Exception catch(e) {
      throw NfcProviderError.fromException(e);
    }
  }
}