getSimInformation method

Future<List<JSimInfo>> getSimInformation()

Future method called getSimInformation has List of JSimInfo return type.

Implementation

Future<List<JSimInfo>> getSimInformation() async {
  List<JSimInfo> simInfo = [];
  try {
    final value = await _methodChannel.invokeListMethod<String>(_SIM_INFO);
    if (value != null) {
      for (var i in value) {
        simInfo.add(JSimInfo.fromMap(json.decode(i)));
      }
    }
    return simInfo;
  } catch (e) {
    return simInfo;
  }
}