flutter_package_manager 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

Package Manager for Android #

This plugin offers the ability of android's PackageManager. You can retrieve the app name, app launcher icon through this package with its package name. The package should be installed on a device.

This plugin supports android only and it is based on androidx.

How to use #

See the ./example and ./lib folders for the details.

Modify minSdkVersion of the android gradle #

In the android/app folder open the build.gradle file and edit minSdkVersion to greater than or equal to 22.

Get package information from the package name #

import 'package:flutter_package_manager/flutter_package_manager.dart';

/// ... other codes

Future<PackageInfo> getPackageInfo() async {
  final PackageInfo info =
    await FlutterPackageManager.getPackageInfo('com.facebook.katana');
  return info;

PackageInfo class contains packageName, appName and appIconByteArray. appIconByteArray is an array of base64 byte image of app icon. You can get flutter's Image widget icon by appIcon getter. If the app is not installed, than null is returned.

Get package names of the all applications installed on the device #

import 'package:flutter_package_manager/flutter_package_manager.dart';

/// ... other codes

Future<List> getInstalledPackages() async {
  List packages = await FlutterPackageManager.getInstalledPackages();
  return packages;

0.2.0 #

  • Add getUserInstalledPackages()

0.1.1 #

  • change appIcon to getAppIcon() with basic parameters.


  • add androidx and minSdkVersion caution.

0.1.0 #

  • add getInstalledPackages()

0.0.3 #

Add management of uninstalled apps

0.0.2 #

Add example

0.0.1 #

  • TODO: Describe initial release.


flutter_package_manager_example #

Demonstrates how to use the flutter_package_manager plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_package_manager: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_package_manager/flutter_package_manager.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Fix lib/flutter_package_manager.dart. (-1 points)

Analysis of lib/flutter_package_manager.dart reported 2 hints:

line 2 col 8: Unused import: 'dart:convert'.

line 4 col 8: Unused import: 'package:flutter/material.dart'.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies