readNDEFRawRecords static method

Future<List<NDEFRawRecord>> readNDEFRawRecords({
  1. bool? cached,
})

Read NDEF records (in raw data, Android & iOS only).

There must be a valid session when invoking. cached only works on Android, allowing cached read (may obtain stale data). On Android, this would cause any other open TagTechnology to be closed. Please use readNDEFRecords if you want decoded NDEF records

Implementation

static Future<List<NDEFRawRecord>> readNDEFRawRecords({bool? cached}) async {
  final String data =
      await _channel.invokeMethod('readNDEF', {'cached': cached ?? false});
  return (jsonDecode(data) as List<dynamic>)
      .map((object) => NDEFRawRecord.fromJson(object))
      .toList();
}