NfcError class

A session ended for a reason the app did not ask for.

Both platforms raise this. In 2.x only iOS did, so an Android tag that went out of range mid-read surfaced as a bare exception on the operation and nothing on the session.

Constructors

NfcError({required NfcErrorSource source, required String message, required bool sessionEnded, NfcReaderErrorCode? iosCode, NfcAndroidErrorCode? androidCode})
Constructs an error. Sessions deliver these; build one directly in tests.
const

Properties

androidCode → NfcAndroidErrorCode?
The Android code. Null unless source is NfcErrorSource.android.
final
hashCode → int
The hash code for this object.
no setterinherited
iosCode → NfcReaderErrorCode?
The CoreNFC code. Null unless source is NfcErrorSource.ios.
final
message → String
The platform's description.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionEnded → bool
Whether the session is over, or merely had one thing go wrong inside it.
final
source → NfcErrorSource
Which platform raised it, and therefore which of the two code fields is set.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited