blockToSector method

Future<int> blockToSector({
  1. required int blockIndex,
})

The sector a block belongs to.

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

Implementation

Future<int> blockToSector({required int blockIndex}) => androidApi.mifareClassicBlockToSector(_handle, blockIndex);