FakeNfcHostApi class

The cross-platform half of the platform side, answering without a channel.

What it stands in for is a device with NFC switched on and a tag with nothing written on it: availability reads enabled, the session calls succeed quietly, and a read comes back null.

Subclass it and override only the calls a test asserts on -- the generated class is concrete and its methods are overridable, which is what makes this possible at all. The rest keep answering, so a test about session lifecycle never has to describe NDEF, and one about NDEF never has to describe a session.

Constructors

FakeNfcHostApi()

Properties

hashCode int
The hash code for this object.
no setterinherited
pigeonVar_binaryMessenger BinaryMessenger?
finalinherited
pigeonVar_messageChannelSuffix String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkAvailability() Future<AvailabilityPigeon>
disposeTag(String handle) Future<void>
ndefRead(String handle) Future<NdefMessagePigeon?>
ndefWrite(String handle, NdefMessagePigeon message) Future<void>
ndefWriteLock(String handle) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startSession(SessionConfigPigeon config) Future<void>
stopSession(String? alertMessage, String? errorMessage) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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