getSystemApps method

  1. @override
Future<List<AppInfo>> getSystemApps(
  1. String bundleIdPrefix,
  2. bool includeIcon,
  3. List<String> permissions,
  4. bool shouldHasAllPermissions,
)
override

Implementation

@override
Future<List<AppInfo>> getSystemApps(
  String bundleIdPrefix,
  bool includeIcon,
  List<String> permissions,
  bool shouldHasAllPermissions,
) async {
  List<dynamic> apps = await methodChannel.invokeMethod(
    'getSystemApps',
    {
      'bundleIdPrefix': bundleIdPrefix,
      '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;
}