MifareClassic class

The class provides access to MifareClassic API for Android.

Acquire MifareClassic instance using MifareClassic.from.

Constructors

MifareClassic({required NfcTag tag, required Uint8List identifier, required int type, required int blockCount, required int sectorCount, required int size, required int maxTransceiveLength, required int timeout})
Constructs an instance with the given values for testing.
const

Properties

blockCount int
The value from MifareClassic#blockCount on Android.
final
hashCode int
The hash code for this object.
no setterinherited
identifier Uint8List
The value from Tag#id on Android.
final
maxTransceiveLength int
The value from MifareClassic#maxTransceiveLength on Android.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sectorCount int
The value from MifareClassic#sectorCount on Android.
final
size int
The value from MifareClassic#size on Android.
final
timeout int
The value from MifareClassic#timeout on Android.
final
type int
The value from MifareClassic#type on Android.
final

Methods

authenticateSectorWithKeyA({required int sectorIndex, required Uint8List key}) Future<bool>
Sends the Authenticate Sector With Key A command to the tag.
authenticateSectorWithKeyB({required int sectorIndex, required Uint8List key}) Future<bool>
Sends the Authenticate Sector With Key B command to the tag.
decrement({required int blockIndex, required int value}) Future<void>
Sends the Decrement command to the tag.
increment({required int blockIndex, required int value}) Future<void>
Sends the Increment command to the tag.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readBlock({required int blockIndex}) Future<Uint8List>
Sends the Read Block command to the tag.
restore({required int blockIndex}) Future<void>
Sends the Restore command to the tag.
toString() String
A string representation of this object.
inherited
transceive({required int data}) Future<Uint8List>
Sends the NfcA command to the tag.
transfer({required int blockIndex}) Future<void>
Sends the Transfer command to the tag.
writeBlock({required int blockIndex, required Uint8List data}) Future<void>
Sends the Write Block command to the tag.

Operators

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

Static Methods

from(NfcTag tag) MifareClassic?
Get an instance of MifareClassic for the given tag.