getSimInfo method

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

Implementation

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

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

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