Skip to content

Commit

Permalink
Change return-type of .finish from void to Future<void>
Browse files Browse the repository at this point in the history
  • Loading branch information
christocracy committed May 3, 2024
1 parent 5228a3a commit 409a1dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 1.3.4 &mdash; 2024-05-03
* Change return-type of `BackgroundFetch.finish` from `void` to `Future<void>`.

## 1.3.3 &mdash; 2024-04-22
* [iOS] Code-sign `TSBackgroundFetch.xcframework` with new Apple Organization (*9224-2932 Quebec Inc*) certificate.

Expand Down
4 changes: 2 additions & 2 deletions lib/background_fetch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,8 @@ class BackgroundFetch {
///
///
///
static void finish(String taskId) {
_methodChannel.invokeMethod('finish', taskId);
static Future<void> finish(String taskId) async {
return await _methodChannel.invokeMethod('finish', taskId);
}

/// __Android-only__: Registers a global function to execute when your app has been terminated.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

1 comment on commit 409a1dc

@christocracy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #351

Please sign in to comment.