Plugin to get the list of installed applications (iOS is not supported yet).
First, you have to import the package in your dart files with:
import 'package:device_apps/device_apps.dart';
To get the list of the apps installed on the device:
List<Application> apps = await DeviceApps.getInstalledApplications();
You can filter system apps if necessary. Note: The list of apps is not ordered!
To get a specific app by package name:
Application app = await DeviceApps.getApp('com.frandroid.app');
To check if an app is installed (via its package name):
bool isInstalled = await DeviceApps.isAppInstalled('com.frandroid.app');
To open an application
DeviceApps.openApp('com.frandroid.app');
When calling the getInstalledApplications()
or getApp()
methods, you can ask for the icon.
To display the image, just call:
Image.memory(app.icon);