diff --git a/CHANGELOG.md b/CHANGELOG.md index 937db21..79ff22e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 1.3.4 — 2024-05-03 +* Change return-type of `BackgroundFetch.finish` from `void` to `Future`. + ## 1.3.3 — 2024-04-22 * [iOS] Code-sign `TSBackgroundFetch.xcframework` with new Apple Organization (*9224-2932 Quebec Inc*) certificate. diff --git a/lib/background_fetch.dart b/lib/background_fetch.dart index 71ffed8..2bee7b6 100644 --- a/lib/background_fetch.dart +++ b/lib/background_fetch.dart @@ -578,8 +578,8 @@ class BackgroundFetch { /// /// /// - static void finish(String taskId) { - _methodChannel.invokeMethod('finish', taskId); + static Future finish(String taskId) async { + return await _methodChannel.invokeMethod('finish', taskId); } /// __Android-only__: Registers a global function to execute when your app has been terminated. diff --git a/pubspec.yaml b/pubspec.yaml index 49f590b..4e71cf3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: background_fetch description: Periodic callbacks in the background for both iOS and Android. Includes Android Headless implementation. -version: 1.3.3 +version: 1.3.4 homepage: https://github.com/transistorsoft/flutter_background_fetch environment: