updater 0.1.4-experimental-1 copy "updater: ^0.1.4-experimental-1" to clipboard
updater: ^0.1.4-experimental-1 copied to clipboard

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

Version

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

⭐ Installing #

dependencies:
    updater: ^0.1.4-experimental

⚡ 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

UpdateStatus #

UpdateStatus.Checking
UpdateStatus.Available
UpdateStatus.DialogDismissed
UpdateStatus.Pending
UpdateStatus.Dowloading
UpdateStatus.Completed
UpdateStatus.Cancelled
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

📙 How To Use #

Inside pubspec.yaml file

# Specify version code using +VersionCode
version: 0.0.3+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');
        },
    );

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

    Updater updater = Updater(
        context: context,
        url: 'JSON_FILE_URL',
        titleText: 'Update available',
        // backgroundDownload: false,
        // allowSkip: false,
        contentText:
            'Update your app to the latest version to enjoy new feature.',
        // allowSkip: false,
        callBack: (verName, verCode, contentText, minSupport, downloadUrl) {
          print(
              '$verName - $verCode - $contentText - $minSupport - $downloadUrl');
        },
        controller: controller,
    );
    updater.check();
    
    updater.resume();
    
    updater.pause();
    
35
likes
0
pub points
78%
popularity

Publisher

verified publishermarsad.dev

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio, flutter, http, open_filex, package_info_plus, path_provider

More

Packages that depend on updater