From 869e4b060a970078eaed993ec541ad13a739453d Mon Sep 17 00:00:00 2001 From: 0x7c01 Date: Wed, 24 May 2023 23:28:36 +0800 Subject: [PATCH] feat(upgrade): export version class. --- CHANGELOG.md | 4 ++-- example/pubspec.lock | 2 +- lib/models/appcast.dart | 4 ++++ lib/upgrade.dart | 3 ++- pubspec.yaml | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaa0239..eafcf7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -## 0.0.4 +## 0.0.5 -* Add Whether crash when lack or incorrectly config Configuration File. +* Export Version class. diff --git a/example/pubspec.lock b/example/pubspec.lock index e15a0a2..143992f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -315,7 +315,7 @@ packages: path: ".." relative: true source: path - version: "0.0.3" + version: "0.0.4" url_launcher: dependency: transitive description: diff --git a/lib/models/appcast.dart b/lib/models/appcast.dart index 67c478a..3b86aca 100644 --- a/lib/models/appcast.dart +++ b/lib/models/appcast.dart @@ -29,6 +29,10 @@ class Appcast { return best; } + void add(AppcastItem item) { + items.add(item); + } + factory Appcast.fromJson(List> json) { return Appcast(items: json.map((item) => AppcastItem.fromJson(item)).toList()); } diff --git a/lib/upgrade.dart b/lib/upgrade.dart index 8ac9939..c065ab9 100644 --- a/lib/upgrade.dart +++ b/lib/upgrade.dart @@ -17,4 +17,5 @@ export 'models/appcast.dart'; export 'models/appcast_item.dart'; export 'models/upgrade_status.dart'; export 'utils/current_version_manager.dart'; -export 'utils/default_file_location.dart'; \ No newline at end of file +export 'utils/default_file_location.dart'; +export 'package:version/version.dart'; \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 1dac1ce..eae84b5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: upgrade description: A Flutter plugin for prompting and help users to upgrade when there is a newer version of this app in the app store or server repository. -version: 0.0.4 +version: 0.0.5 homepage: https://github.com/Flutter-Chore/Flutter-InAppUpgrade