mifareClassicBlockToSector method

  1. @override
Future<int> mifareClassicBlockToSector(
  1. String handle,
  2. int blockIndex
)

Sector geometry is not uniform -- a 4K card has 32 sectors of 4 blocks then 8 of 16 -- so this cannot be computed from blockCount and sectorCount. Reads a static description rather than talking to the tag, so it needs no connection.

Implementation

@override
Future<int> mifareClassicBlockToSector(String handle, int blockIndex) async => blockIndex ~/ 4;