Search code examples
flutterdartnfc

Flutter NFC lock


Hello anyone works with NFC before https://pub.dev/packages/nfc_manager I used this package before and I have a problem now that after writing on NFC card I wanna lock it to stop writing on it again and be read-only I have an android app do this lock method but I wanna do it with flutter thank you in advance.


Solution

  • The package has a method to implement a write lock

    https://pub.dev/documentation/nfc_manager/latest/nfc_manager/Ndef/writeLock.html

    Byte[3] of the Capability Container as specified by the NFC standards is a write access lock field (which can be seen at http://apps4android.org/nfc-specifications/ )

    The nfc_manager with this method should be using this field to write lock the card.