Giter VIP home page Giter VIP logo

new_version's Introduction

New Version Plugin ๐ŸŽ‰

A Flutter plugin that makes it possible to:

  • Check if a user has the most recent version of your app installed.
  • Show the user an alert with a link to the appropriate app store page.

See more at the Dart Packages page.

Screenshots

Installation

Add new_version as a dependency in your pubspec.yaml file.

dependencies:
  new_version: ^0.0.5

Usage

In main.dart (or wherever your app is initialized), create an instance of NewVersion using your current build context. final newVersion = NewVersion(context).

The plugin will automatically use your Flutter package identifier to check the app store. If your app has a differnet identifier in the Google Play Store or Apple App Store, you can overwrite this by providing values for androidId and/or iOSId.

You can use then use the plugin in two ways.

Quickstart

Calling showAlertIfNecessary will check if the app can be updated, and will automatically dispaly a platform-specific alert that the user can use to go to the app store.

newVersion.showAlertIfNecessary();

Advanced ๐Ÿ˜Ž

If you want to create a custom alert or use the app version information differently, call getVersionStatus. This will return a VersionStatus Future with information about the local and app store versions of the app.

final status = await newVersion.getVersionStatus();
status.canUpdate // (true)
status.localVersion // (1.2.1)
status.storeVersion // (1.2.3)
status.appStoreLink // (https://itunes.apple.com/us/app/google/id284815942?mt=8)

new_version's People

Contributors

timtraversy avatar sachinganesh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.