Search packages, repositories and app categories

updater cover
Package detailsv0.2.5

updater

A package to check for the custom in-app updates for Flutter.

Android
30-day downloads
144
Likes
41
Pub points
150

Install package

flutter pub add updater

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The updater package enables Flutter apps to check for custom in-app updates, allowing developers to manage version control and prompt users to update directly within the app. Designed specifically for Android, it integrates seamlessly into existing workflows by fetching update details from a user-defined source. This helps maintain app quality and ensures users are on the latest version without relying solely on app store updates. The package is lightweight and easy to implement with minimal configuration.

Use cases

  • In-app update notifications
  • Custom update logic
  • User-driven update prompts
  • Version compatibility checks
  • App maintenance
  • Offline update detection

Key features

  • Custom update source support
  • Android-only platform targeting
  • Simple integration
  • Lightweight design
  • Configurable update checks
  • No external dependencies

Suitable for

  • Developers managing app versions
  • Apps requiring controlled update rollouts
  • Projects with frequent releases
  • Teams using internal or private update servers
  • Flutter apps targeting Android

Considerations

  • Limited to Android platform
  • Requires manual update metadata setup
  • No iOS support
  • Depends on external server for update info
  • Not suitable for public app store updates
  • Needs secure connection to update endpoint

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Version

A package to check for the custom in-app updates for Flutter.

⭐ Installing

dependencies:
    updater: ^0.2.5

⚡ Import

import 'package:updater/updater.dart';
Android IOS
Supported ✔️ ❌
alt text

Properties

context → BuildContext
url → String
titleText → String
contentText → String
confirmText → String
cancelText → String
elevation → double
rootNavigator → bool
allowSkip → bool
backgroundDownload → bool
callBack → Function(String, int, String, int String)
controller → UpdaterController
delay → Duration
enableResume → bool

UpdateStatus

UpdateStatus.Checking
UpdateStatus.Pending
UpdateStatus.Available
UpdateStatus.Dowloading
UpdateStatus.Paused
UpdateStatus.Resume
UpdateStatus.Cancelled
UpdateStatus.Completed
UpdateStatus.DialogDismissed
UpdateStatus.Failed

Json Structure

versionCode → int
versionName → String
minSupport → int
contentText → String
url → String 
{
  "versionCode":3,
  "versionName":"1.0.0",
  "contentText":"Please update your app",
  "minSupport":2,
  "url":"/*App Download Url*/"
}
versionCode:   //Specify new version code
versionName:   //specify version name
minSuppor:     //specify minimum supported version to force update
contentText:   //specify content text, if contentText is not defined in app then this will be use
url:          //App file download link

⚙ Setup

Android
  • Add REQUEST_INSTALL_PACKAGES permission to open and install apk file
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

📙 How To Use

Inside pubspec.yaml file

# Specify version code using +VersionCode
version: 1.0.0+1  #Like here the VersionCode is 1
    //Controller
    UpdaterController controller = UpdaterController(
        listener: (UpdateStatus status) {
            print('Listener: $status');
        },
        onChecked: (bool isAvailable) {
            print(isAvailable);
        },
        progress: (current, total) {
            print('Progress: $current -- $total');
        },
        onError: (status) {
            print('Error: $status');
        },
    );


    Updater updater = Updater(
        context: context,
        controller: controller,
        url: 'JSON_FILE_URL',
        titleText: 'Update available',
        // backgroundDownload: false,
        // allowSkip: false,
        contentText:
            'Update your app to the latest version to enjoy new feature.',
        callBack: (UpdateModel model) {

          print(model.versionName);
          print(model.versionCode);
          print(model.contentText);
          
        },
        
        enableResume: false,
    );
    updater.check();
    
    
    //To cancel the download
    //controller.cancel();


    //To pause the download
    //controller.pause();

    //To resume the download
    //controller.resume();

    
    

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

No data available yet.