parseList static method
Implementation
static List<AppInfo> parseList(dynamic apps) {
if (apps == null || apps is! List || apps.isEmpty) return [];
final List<AppInfo> appInfoList = apps
.where((element) =>
element is Map &&
element.containsKey("name") &&
element.containsKey("package_name"))
.map((app) => AppInfo.create(app))
.toList();
appInfoList.sort((a, b) => a.name.compareTo(b.name));
return appInfoList;
}