getSimInfo method
Implementation
@override
Future<List<SimInfo>?> getSimInfo() async {
final info = await methodChannel.invokeMethod<String>('getSimInfo');
List<SimInfo>? simInfoList;
if (info != null) {
simInfoList = [];
/// convert json to list
final infoJson = json.decode(info);
infoJson.forEach((element) {
simInfoList?.add(SimInfo.fromJson(element));
});
}
return simInfoList;
}