Toni Joe
Toni Joe

Reputation: 8417

How to retrieve android installed packages icons in flutter?

I'm trying to make a simple android app that lists the device installed apps with flutter. Now, there is a plugin called PackageInfo that provides an API for querying information about an application package. But the problem is it only retrieves string information about the package (appName, packageName, version, and buildNumber). But in addition to these info, I also want to extract package icon which is problematic because flutter's platform channels only supports general types such as int, string, lists but not platform specific types such as drawables. Any Idea how this can be accomplished? Thanks

Upvotes: 3

Views: 2132

Answers (1)

CopsOnRoad
CopsOnRoad

Reputation: 268274

You can use device_apps plugin, however only Android allows you to fetch installed apps.

Example:

// list of all apps
List<Application> apps = await DeviceApps.getInstalledApplications();

Upvotes: 3

Related Questions