android_app_info 0.0.4

  • Example
  • Installing
  • Versions
  • 0


import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:android_app_info/android_app_info.dart';

void main() {
  runApp(new MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => new _MyAppState();

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  List<AndroidAppInfo> _apps = [];

  initState() {

  initPlatformState() async {
    String platformVersion;
    try {
      platformVersion = await AndroidAppInfo.platformVersion;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';

    // Grabs the list of avaiable application activities.
    // If you want the actual *applications*, try AndroidAppInfo.getInstalledApplications.
    // (They both return Future<List<AndroidAppInfo>>).
    var apps = await AndroidAppInfo.getAvailableActivities();

    if (!mounted)

    setState(() {
      _platformVersion = platformVersion;
      _apps = apps;

  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        body: new ListView.builder(
          itemCount: _apps.length,
          itemBuilder: (BuildContext context, int index) {
            var app = _apps[index];
            return new ListTile(
              // For a full list of the properties on an AndroidAppInfo instance, see the source
              // app.icon is the app's icon
              // app.defaultIcon is the default application icon
              leading: new Image.memory(app.icon ?? app.defaultIcon),
              // obvious...
              title: new Text(app.label ?? ?? 'Unknown'),
              // also obvious...
              subtitle: new Text('${app.packageName}'),
              onTap: () => app.start(),

Use this package as a library

1. Depend on it

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

  android_app_info: ^0.0.4

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:android_app_info/android_app_info.dart';
Version Uploaded Documentation Archive
0.0.4 Aug 17, 2017 Go to the documentation of android_app_info 0.0.4 Download android_app_info 0.0.4 archive
0.0.3 Aug 16, 2017 Go to the documentation of android_app_info 0.0.3 Download android_app_info 0.0.3 archive
0.0.2 Aug 3, 2017 Go to the documentation of android_app_info 0.0.2 Download android_app_info 0.0.2 archive
0.0.1 Aug 3, 2017 Go to the documentation of android_app_info 0.0.1 Download android_app_info 0.0.1 archive
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.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Make sure flutter format runs.

Running flutter format failed with the following output:

Exception: dartfmt on lib/ failed with exit code 65
Could not format because the source could not be parsed:

line 32, column 7 of lib/android_app_info.dart: Unexpected text 'await'.
      await _channel.invokeMethod('get-data', {"name": name}));
Formatting failed: 65

Health issues and suggestions

Fix lib/android_app_info.dart. (-43.75 points)

Analysis of lib/android_app_info.dart failed with 2 errors:

line 31 col 5: The return type 'AndroidAppInfo' isn't a 'Future<AndroidAppInfo>', as defined by the method 'getApplication'.

line 32 col 7: Unexpected text 'await'.

Maintenance issues and suggestions

Add SDK constraint in pubspec.yaml. (-50 points)

For information about setting SDK constraint, please see

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Make sure flutter format runs.

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Maintain (-30 points)

Readme should inform others about your project, what it does, and how they can use it.

Maintain (-20 points)

Changelog entries help clients to follow the progress in your code.

Package is getting outdated. (-32.60 points)

The package was released 69 weeks ago.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8