in_app_update 1.1.6

pub package

Presented by

Maintained by Jonas Bark

in_app_update #

Enables In App Updates on Android using the official Android APIs.

Documentation #

The following methods are exposed:

  • Future<AppUpdateInfo> checkForUpdate(): Checks if there's an update available
  • Future<void> performImmediateUpdate(): Performs an immediate update (full-screen)
  • Future<void> startFlexibleUpdate(): Starts a flexible update (background download)
  • Future<void> completeFlexibleUpdate(): Actually installs an available flexible update

Please have a look in the example app on how to use it!

Android #

This plugin integrates the official Android APIs to perform in app updated that were released in 2019:

iOS #

iOS does not offer such a functionality. You might want to look into e.g. If you call the methods above on a iOS device you'll run into a not-implemented exception.

1.1.6 #

  • Handle cases where no foreground activity is available (#10)

1.1.5 #

  • Fix Result already submitted exception (#8)

1.1.4 #

1.1.3 #

  • Fix Android build.

1.1.1 #

  • Breaking change: Renamed InAppUpdateState to AppUpdateInfo to mirror the Android SDK and the updateType property has been replaced by immediateUpdateAllowed & flexibleUpdateAllowed. The updateType property was previously broken. Consequently, refactoring is sensible. This also means that UpdateType has been removed.
  • Added support for resuming immediate updates that were cancelled. This is handled automatically and does not require any Flutter-side code.
  • Added documentation to the library.

1.0.2 #

  • Readme and example updates

1.0.0 #

  • First version released.


in_app_update_example #

Demonstrates how to use the in_app_update plugin.

    child: Text('Check for Update'),
    onPressed: () {
      InAppUpdate.checkForUpdate().then((state) {
            setState(() {
              _updateState = state;
          }).catchError((e) => _showError(e));
    child: Text('Perform immediate update'),
    onPressed: () {
    child: Text('Start flexible update'),
    onPressed: () {
      InAppUpdate.startFlexibleUpdate().then((_) {
        setState(() {
          _flexibleUpdateAvailable = true;
      }).catchError((e) => _showError(e));
    child: Text('Complete flexible update'),
    onPressed: !_flexibleUpdateAvailable
        ? null
        : () {
            InAppUpdate.completeFlexibleUpdate().then((_) {
              _scaffoldKey.currentState.showSnackBar(SnackBar(content: Text('Success!')));
            }).catchError((e) => _showError(e));

Use this package as a library

1. Depend on it

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

  in_app_update: ^1.1.6

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:in_app_update/in_app_update.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 Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.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