Skip to content

Commit

Permalink
Update README.md
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 Nov 22, 2023
1 parent 370df0c commit 19e3b28
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 19e3b28

Please sign in to comment.