getInstalledApps method

Future<List<AppInfo>> getInstalledApps (
  1. [bool excludeSystemApps = true,
  2. bool withIcon = false,
  3. String packageNamePrefix = ""]
)

Implementation

static Future<List<AppInfo>> getInstalledApps(
    [bool excludeSystemApps = true,
    bool withIcon = false,
    String packageNamePrefix = ""]) async {
  List<dynamic> apps = await _channel.invokeMethod('getInstalledApps', {
    "exclude_system_apps": excludeSystemApps,
    "with_icon": withIcon,
    "package_name_prefix": packageNamePrefix
  });
  List<AppInfo> appInfoList = apps.map((app) => AppInfo.create(app)).toList();
  appInfoList.sort((a, b) => a.name.compareTo(b.name));
  return appInfoList;
}