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.
Add new_version as a dependency in your
dependencies: new_version: ^0.0.3
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
You can use then use the plugin in two ways.
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.
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.needsUpdate // (true) status.localVersion // (1.2.1) status.storeVersion // (1.2.3) status.appStoreLink // (https://itunes.apple.com/us/app/google/id284815942?mt=8)
- Built-in types and core primitives for a Flutter application. [...]
- Support for asynchronous programming, with classes such as Future and Stream. [...]
- Classes and utilities that supplement the collection support in dart:core. [...]
- Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
- Built-in types, collections, and other core functionality for every Dart program. [...]
- Interact with developer tools such as the debugger and inspector. [...]
- Mathematical constants and functions, plus a random number generator. [...]
- Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]
- File, socket, HTTP, and other I/O support for non-web applications. [...]
- Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]