简体   繁体   中英

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

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();

I think what you are looking for is this . Although i havent used this plugin myself but they clearly state that this plugin will retrieve all the apps along with all the info and also the icons of respective apps. Launcher Assist Plugin here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM