From 983245f6b9868fa94322146f7ed931fcb5cdf112 Mon Sep 17 00:00:00 2001 From: wjhwang Date: Tue, 24 Sep 2024 15:59:37 +0900 Subject: [PATCH] release: 8.10.0 --- CHANGELOG.md | 7 +++++++ README.md | 2 +- documentation/migration_documentation.md | 20 ++++++++++++++++++++ pubspec.yaml | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bef7587a..24071c8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 8.10.0 + +* [**BREAKING**] Change `onStart`, `onDestroy` callback return type from `void` to `Future` + - The onRepeatEvent callback is called when the onStart asynchronous operation has finished + - Now you can access network, database, and other plugins in onDestroy callback [#276](https://github.com/Dev-hwang/flutter_foreground_task/issues/276) + - Check [migration_documentation](./documentation/migration_documentation.md) for changes + ## 8.9.0 * [**CHANGE**] Ignore `autoRunOnBoot` option when service is stopped by developer diff --git a/README.md b/README.md index 0ddf06bd..34e36441 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ To use this plugin, add `flutter_foreground_task` as a [dependency in your pubsp ```yaml dependencies: - flutter_foreground_task: ^8.9.0 + flutter_foreground_task: ^8.10.0 ``` After adding the `flutter_foreground_task` plugin to the flutter project, we need to specify the permissions and service to use for this plugin to work properly. diff --git a/documentation/migration_documentation.md b/documentation/migration_documentation.md index 6825bbaf..464fa2d7 100644 --- a/documentation/migration_documentation.md +++ b/documentation/migration_documentation.md @@ -1,5 +1,25 @@ ## Migration +### ver 8.10.0 + +- Change onStart, onDestroy callback return type from `void` to `Future`. + +```dart +// before +@override +void onStart(DateTime timestamp, TaskStarter starter) { } + +@override +void onDestroy(DateTime timestamp) { } + +// after +@override +Future onStart(DateTime timestamp, TaskStarter starter) async { } + +@override +Future onDestroy(DateTime timestamp) async { } +``` + ### ver 8.6.0 - Remove `interval`, `isOnceEvent` option in ForegroundTaskOptions model. diff --git a/pubspec.yaml b/pubspec.yaml index 3ed89317..b3ea1348 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_foreground_task description: This plugin is used to implement a foreground service on the Android platform. -version: 8.9.0 +version: 8.10.0 homepage: https://github.com/Dev-hwang/flutter_foreground_task environment: