in_app_update_android 1.1.1 copy "in_app_update_android: ^1.1.1" to clipboard
in_app_update_android: ^1.1.1 copied to clipboard

A Flutter plugin for prompting users about Android in-app updates using Play Core API.

Logo

in_app_update_android

A Flutter plugin for Android in-app updates using the Google Play Core In-App Update API.

pub.dev License CI Platform Flutter Dart


Features #

  • Check Google Play for update availability
  • Immediate full-screen update flows
  • Flexible background update flows with reliable progress tracking
  • Install state and download progress listeners
  • Flexible update completion handling
  • Optional allowAssetPackDeletion for low-storage devices
  • Typed Dart exceptions for unsupported platforms

Requirements #

Requirement Details
Flutter >=3.24.0
Dart >=3.5.0
Android API 21+
Installation Google Play, Internal App Sharing, or any Play testing track

Note: In-app updates do not work with locally sideloaded debug APKs. Use Play internal app sharing or a testing track when developing.

Quick Start #

import 'package:in_app_update_android/in_app_update_android.dart';

Future<void> checkAndUpdate() async {
  if (!InAppUpdate.isAndroid) return;

  final info = await InAppUpdate.checkForUpdate();
  if (!info.updateAvailable) return;

  if (info.immediateUpdateAllowed || info.immediateUpdateInProgress) {
    await InAppUpdate.performImmediateUpdate();
    return;
  }

  if (info.flexibleUpdateAllowed) {
    InAppUpdate.installStateListener.listen((state) async {
      if (state.installStatus == InstallStatus.downloaded) {
        await InAppUpdate.completeFlexibleUpdate();
      }
    });

    await InAppUpdate.startFlexibleUpdate();
  }
}

Tip: Subscribe to installStateListener before calling startFlexibleUpdate() for the most responsive UI.

API Reference #

Method Returns Description
InAppUpdate.isAndroid bool Check if running on Android
checkForUpdate() Future<AppUpdateInfo> Check for available updates
performImmediateUpdate() Future<AppUpdateResult> Start immediate update
startFlexibleUpdate() Future<AppUpdateResult> Start flexible update
completeFlexibleUpdate() Future<void> Complete downloaded flexible update
installStateListener Stream<InstallState> Stream install state & progress events

Play Console Notes #

  • Update priority is controlled via inAppUpdatePriority in the Play Developer API.
  • clientVersionStalenessDays is provided by Google Play when available.
  • Update availability may be delayed by Play Store caching and rollout state.

License #

MIT

2
likes
0
points
465
downloads

Publisher

verified publishersajedur0.online

Weekly Downloads

A Flutter plugin for prompting users about Android in-app updates using Play Core API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on in_app_update_android

Packages that implement in_app_update_android