Skip to content

Commit

Permalink
Update README.md (#523)
Browse files Browse the repository at this point in the history
await is used but in a not asynchronous fonction -> just add async for the workmanager().executetask fonction
  • Loading branch information
Pyranox authored Apr 8, 2024
1 parent 3bccf16 commit 8901f29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Wrap the code inside your `Workmanager().executeTask` in a `try and catch` in or
```dart
@pragma('vm:entry-point')
void callbackDispatcher() {
Workmanager().executeTask((task, inputData) {
Workmanager().executeTask((task, inputData) async {
int? totalExecutions;
final _sharedPreference = await SharedPreferences.getInstance(); //Initialize dependency
Expand Down

0 comments on commit 8901f29

Please sign in to comment.