https://github.com/mantreshkhurana/app_updater
App Updater for Flutter Apps, supporting Android, iOS, Window, macOS & Linux. Update them via official App Store or from custom url path.
https://github.com/mantreshkhurana/app_updater
app-updater app-version-checker dart flutter flutter-app-updater
Last synced: 3 months ago
JSON representation
App Updater for Flutter Apps, supporting Android, iOS, Window, macOS & Linux. Update them via official App Store or from custom url path.
- Host: GitHub
- URL: https://github.com/mantreshkhurana/app_updater
- Owner: mantreshkhurana
- License: mit
- Created: 2023-02-04T08:05:55.000Z (over 2 years ago)
- Default Branch: stable
- Last Pushed: 2023-05-28T13:31:36.000Z (almost 2 years ago)
- Last Synced: 2024-05-02T04:39:11.655Z (about 1 year ago)
- Topics: app-updater, app-version-checker, dart, flutter, flutter-app-updater
- Language: C++
- Homepage: https://pub.dev/packages/app_updater
- Size: 461 KB
- Stars: 16
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# App Updater
[](https://github.com/mantreshkhurana/app_updater)
[](https://pub.dartlang.org/packages/app_updater)Check for app updates and show a dialog to update the app, open app/play store from your app.

## Installation
Add `app_updater: ^1.0.6` in your project's pubspec.yaml:
```yaml
dependencies:
app_updater: ^1.0.6
```## Usage
Import `app_updater` in your dart file:
```dart
import 'package:app_updater/app_updater.dart';
```Then use `checkAppUpdate` in your code:
> checkAppUpdate function won't show any dialog in iOS Simulator. [Source](https://stackoverflow.com/questions/13645554/itunes-app-link-cannot-open-page-in-safari-in-simulator-and-also-idevices)
### Default Usage
```dart
checkAppUpdate(
context,
appName: 'Example App',
iosAppId: '123456789',
androidAppBundleId: 'com.example.app',
);
```### Custom Usage
```dart
checkAppUpdate(
context,
appName: 'Example App',
iosAppId: '123456789',
androidAppBundleId: 'com.example.app',
isDismissible: true,
customDialog: true,
customAndroidDialog: AlertDialog(
title: const Text('Update Available'),
content: const Text('Please update the app to continue'),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text('Cancel'),
),
TextButton(
onPressed: () {
OpenStore.instance.open(
androidAppBundleId: 'com.example.app',
);
Navigator.pop(context);
},
child: const Text('Update'),
),
],
),
customIOSDialog: CupertinoAlertDialog(
title: const Text('Update Available'),
content: const Text('Please update the app to continue'),
actions: [
CupertinoDialogAction(
onPressed: () {
Navigator.pop(context);
},
child: const Text('Cancel'),
),
CupertinoDialogAction(
onPressed: () {
OpenStore.instance.open(
appName: 'Example App',
appStoreId: '123456789',
);
Navigator.pop(context);
},
child: const Text('Update'),
),
],
),
);
```## Open App/Play Store
This function is inspired from [open_store](https://pub.dev/packages/open_store), but it had some issues with iOS, so I created a [pull request](https://github.com/Frezyx/open_store/pull/10) to fix it but it's not merged yet.
```dart
onTap(){
OpenStore.instance.open(
appName: 'Example App',
appStoreId: '123456789',
androidAppBundleId: 'com.example.app',
);
}
```## Credits
- [store_version_checker](https://pub.dev/packages/store_version_checker)
- [url_launcher](https://pub.dev/packages/url_launcher)