flutter_updater_package 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new58

flutter_updater_package #

An easy way to implement OTA updates.

Getting Started #

First you need to mark the dependency ([package]: [version]) in the pubspec.yaml. Then all you need to do is import the package into a dart file and call Updater.checkUpdates ([String currentVersion], [String latestVersionPath], [String updateUrlPath]);

All arguments:

Required arguments:

String [currentVersion] = "x.x.x" -> The current version as a string. String [latestVersionPath] = "http://... || https://..." -> http address where the latest version is saved as a string. String [updateUrlPath] = "http://... || https://..." -> http address after URL is saved from which the update will be downloaded.

Optional arguments:

bool [sampleUpdate] = "bool" -> If true, it will only show the change of update status. The arguments: [latestVersionPath], [updateUrlPath] will not be considered. Function [setState] = "(){}" -> It is possible to pass a function that is called whenever the update status changes and always during the download. This argument is meant to call the setState () {} of a widget to show information about the status of the update. int [delay] = "seconds" = If [sampleUpdate] = true, the status of the update will change every x seconds.

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.0.1] - TODO: Add release date.

  • 1.0.0: The package searches for updates, downloads them and opens package installation.
  • 1.0.1: Added comments and example.


import 'package:flutter/material.dart';

import './example.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Example',
      theme: ThemeData.dark(),
      home: Example(),

Use this package as a library

1. Depend on it

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

  flutter_updater_package: ^1.0.1

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

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (open_file).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
dio ^3.0.7 3.0.8
flutter 0.0.0
open_file ^2.1.1 2.1.1 3.0.1
path_provider ^1.5.1 1.5.1
permission_handler ^4.0.0 4.2.0+hotfix.1
Transitive dependencies
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
platform 2.2.1
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies