auto_updater 0.1.0 auto_updater: ^0.1.0 copied to clipboard
This plugin allows Flutter desktop apps to automatically update themselves (based on sparkle and winsparkle).
auto_updater #
This plugin allows Flutter desktop apps to automatically update themselves (based on sparkle and winsparkle).
English | 简体中文
Platform Support #
Linux | macOS | Windows |
---|---|---|
➖ | ✔️ | ✔️ |
Quick Start #
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
auto_updater: ^0.1.0
Or
dependencies:
auto_updater:
git:
url: https://github.com/leanflutter/auto_updater.git
ref: main
Usage #
import 'package:auto_updater/auto_updater.dart';
void main() async {
// Must add this line.
WidgetsFlutterBinding.ensureInitialized();
String feedURL = 'http://localhost:5000/appcast.xml';
await autoUpdater.setFeedURL(feedURL);
await autoUpdater.checkForUpdates();
runApp(MyApp());
}
Please see the example app of this plugin for a full example.
Who's using it? #
- Biyi - A convenient translation and dictionary app.
API #
AutoUpdater #
Methods
setFeedURL
Sets the url and initialize the auto updater.
checkForUpdates
Asks the server whether there is an update. You must call setFeedURL before using this API.