NfcUtilAndroid class

The raw Android surface.

Everything here is Android-only; on iOS these calls throw. The cross-platform NfcUtil covers the common path, and this covers what it deliberately does not express.

Properties

hashCode int
The hash code for this object.
no setterinherited
onAdapterStateChanged Stream<NfcAdapterState>
Emits when the user switches NFC on or off in system settings.
no setter
onTagFromIntent Future<void> Function(NfcTag tag)?
Tags delivered by an intent filter rather than by a reader session.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

disableForegroundDispatch() Future<void>
Releases the claim made by enableForegroundDispatch.
disableReaderMode() Future<void>
Stops reader mode.
enableForegroundDispatch() Future<void>
Claims tag delivery while the activity is in the foreground.
enableReaderMode({required Set<NfcReaderFlag> flags, required Future<void> onDiscovered(NfcTag tag), Future<void> onError(NfcError error)?, Duration presenceCheckDelay = const Duration(milliseconds: 250)}) Future<void>
Starts reader mode with exactly flags, bypassing the cross-platform mapping.
isEnabled() Future<bool>
Whether the adapter is switched on.
isSecureNfcEnabled() Future<bool>
Whether secure NFC is on, restricting tag reading to an unlocked device.
isSecureNfcSupported() Future<bool>
Whether the device supports secure NFC. API 29 and above; false below.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
takeInitialTag() Future<NfcTag?>
The tag whose intent launched the app, if the app was launched by a tap.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance NfcUtilAndroid
no setter