getApps method
Future<List<AppInfo> >
getApps(
- String bundleIdPrefix,
- bool includeSystemApps,
- bool includeIcon,
- List<
String> permissions, - bool shouldHasAllPermissions,
override
Implementation
@override
Future<List<AppInfo>> getApps(
String bundleIdPrefix,
bool includeSystemApps,
bool includeIcon,
List<String> permissions,
bool shouldHasAllPermissions,
) async {
List<dynamic> apps = await methodChannel.invokeMethod(
'getApps',
{
'bundleIdPrefix': bundleIdPrefix,
'includeSystemApps': includeSystemApps,
'includeIcon': includeIcon,
'permissions': permissions,
'hasAllPermissions': shouldHasAllPermissions,
},
);
List<AppInfo> appInfoList = apps.map((app) => AppInfo.create(app)).toList();
appInfoList.sort((a, b) => a.name!.compareTo(b.name!));
return appInfoList;
}