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

outdated

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

example/lib/main.dart

/*
 * Copyright (c) 2019 Larry Aasen. All rights reserved.
 */

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) {
    // Only call clearSavedSettings() during testing to reset internal values.
    Upgrader().clearSavedSettings();

    // On Android, setup the Appcast.
    // On iOS, the default behavior will be to use the App Store version of
    // the app, so update the Bundle Identifier in example/ios/Runner with a
    // valid identifier already in the App Store.
    final appcastURL =
        'https://raw.githubusercontent.com/larryaasen/upgrader/master/test/testappcast.xml';
    final cfg = AppcastConfiguration(url: appcastURL, supportedOS: ['android']);

    return MaterialApp(
      title: 'Upgrader Example',
      home: Scaffold(
          appBar: AppBar(
            title: Text('Upgrader Example'),
          ),
          body: UpgradeAlert(
            appcastConfig: cfg,
            debugLogging: true,
            child: Center(child: Text('Checking...')),
          )),
    );
  }
}
1854
likes
0
pub points
99%
popularity

Publisher

verified publisherlarryaasen.com

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

device_info, flutter, flutter_device_locale, http, package_info, shared_preferences, url_launcher, version, xml

More

Packages that depend on upgrader