upgrader 0.1.0 copy "upgrader: ^0.1.0" to clipboard
upgrader: ^0.1.0 copied to clipboard

outdated

A new Flutter package.

Upgrader #

Flutter package for prompting users to upgrade when there is a newer version of the app in the store.

Build Status codecov pub package

A simple prompt widget is displayed when a newer app version is availabe in the store.

Example #

Just wrap your body widget in the UpgradeAlert widget. It will handle the rest.

import 'package:flutter/material.dart';
import 'package:upgrader/upgrader.dart';

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

class MyApp extends StatelessWidget {
  MyApp({
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Upgrader Example',
      home: Scaffold(
          appBar: AppBar(
            title: Text('Upgrader Example'),
          ),
          body: UpgradeAlert(
            child: Center(child: Text('Checking...')),
          )
      ),
    );
  }
}

Screenshot #

image

Customization #

The UpgradeAlert widget can be customized by setting parameters in the constructor of the UpgradeAlert widget.

  • buttonTitleIgnore: the ignore button title, which defaults to Ignore
  • buttonTitleRemind: the remind button title, which defaults to Remind
  • buttonTitleUpdate: the update button title, which defaults to Update Now
  • prompt: the call to action message, which defaults to Would you like to update it now?
  • title: the alert dialog title, which defaults to Update App?

Android #

Unfortunately, this widget only works on iOS at the time. There is no easy way to query the Google Play Store for metadata about an app. Without the metadata, the widget cannot compare the app version with the latest Play Store version.

Support for Android coming soon.

iTunes Search API #

There is a class in this Flutter package used by the UpgradeAlert widget to download app details from the iTunes Serach API. The class ITunesSearchAPI can be used standalone with the UpgradeAlert widget to query iTunes for app details.

final iTunes = ITunesSearchAPI();
final results = await iTunes.lookupURLByBundleId('com.google.Maps');

Contributing #

All comments and pull requests are welcome.