writeBlock<T> static method
Future<void>
writeBlock<T>(
- int index,
- T data, {
- Iso15693RequestFlags? iso15693Flags,
- bool iso15693ExtendedMode = false,
Write one unit of data (specified below) to:
- MIFARE Classic tag: one 16B block (Android only)
- MIFARE Ultralight tag: one 4B page (Android only)
- ISO 15693 tag: one 4B block (iOS only)
There must be a valid session when invoking.
index
refers to the block / page index.
For MIFARE Classic tags, you must first authenticate against the corresponding sector.
Implementation
static Future<void> writeBlock<T>(int index, T data,
{Iso15693RequestFlags? iso15693Flags,
bool iso15693ExtendedMode = false}) async {
assert(T is String || T is Uint8List);
var flags = iso15693Flags ?? Iso15693RequestFlags();
await _channel.invokeMethod('writeBlock', {
'index': index,
'data': data,
'iso15693Flags': flags.encode(),
'iso15693ExtendedMode': iso15693ExtendedMode,
});
}