getInstalledApps static method

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

Retrieves a list of installed apps on the device.

excludeSystemApps specifies whether to exclude system apps from the list. withIcon specifies whether to include app icons in the list. packageNamePrefix is an optional parameter to filter apps with package names starting with a specific prefix.

Returns a list of AppInfo objects representing the installed apps.

Implementation

static Future<List<AppInfo>> getInstalledApps([
  bool excludeSystemApps = true,
  bool withIcon = false,
  String packageNamePrefix = "",
]) async {
  dynamic apps = await _channel.invokeMethod(
    "getInstalledApps",
    {
      "exclude_system_apps": excludeSystemApps,
      "with_icon": withIcon,
      "package_name_prefix": packageNamePrefix,
    },
  );
  return AppInfo.parseList(apps);
}