getNfcInfo method

  1. @override
Future<Map<String, dynamic>> getNfcInfo()
override

Implementation

@override
Future<Map<String, dynamic>> getNfcInfo() async {
  Map<String, dynamic> result = <String, dynamic>{};

  try {
    final nfcInfo =
        await methodChannel.invokeMethod<Map<dynamic, dynamic>>('getNfcInfo');

    return jsonDecode(_jsonEncoder.convert(nfcInfo));
  } on PlatformException catch (error) {
    return result
      ..addEntries(
          [MapEntry("code", error.code), MapEntry("message", error.message)]);
  }
}