initial commit (migrated)
This commit is contained in:
commit
b594facb51
143 changed files with 11057 additions and 0 deletions
22
lib/core/app_updater.dart
Normal file
22
lib/core/app_updater.dart
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import 'package:in_app_update/in_app_update.dart';
|
||||
|
||||
/// A wrapper of in-app update plugin
|
||||
abstract class AppUpdater {
|
||||
/// Check for in-app update
|
||||
Future<AppUpdateInfo> checkForUpdate();
|
||||
|
||||
/// Start update process
|
||||
Future<AppUpdateResult> update();
|
||||
}
|
||||
|
||||
class AppUpdaterImpl implements AppUpdater {
|
||||
@override
|
||||
Future<AppUpdateInfo> checkForUpdate() async {
|
||||
return InAppUpdate.checkForUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<AppUpdateResult> update() async {
|
||||
return InAppUpdate.performImmediateUpdate();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue