enableNfcEvents method

Future<bool> enableNfcEvents()

Starts delivering onNfcEvent. Returns false on a device below API 36.

Registration is explicit rather than implicit in listening to the stream, because it costs a framework callback that the plugin has to unregister again: leaving one behind keeps the plugin, and through it the Flutter engine, alive after teardown. Pair it with disableNfcEvents, although the plugin also unregisters when the engine detaches.

Implementation

Future<bool> enableNfcEvents() => androidApi.enableNfcEvents();