upgrader 0.4.1 upgrader: ^0.4.1 copied to clipboard
Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
/*
* Copyright (c) 2018 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) {
Upgrader().clearSavedSettings();
Upgrader().installAppStoreVersion('1.1.0');
Upgrader().installAppStoreListingURL(
'https://itunes.apple.com/us/app/google-maps-transit-food/id585027354?mt=8&uo=4');
}
@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...')),
)),
);
}
}