Skip to content

Commit 8901f29

Browse files
authored
Update README.md (#523)
await is used but in a not asynchronous fonction -> just add async for the workmanager().executetask fonction
1 parent 3bccf16 commit 8901f29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Wrap the code inside your `Workmanager().executeTask` in a `try and catch` in or
5454
```dart
5555
@pragma('vm:entry-point')
5656
void callbackDispatcher() {
57-
Workmanager().executeTask((task, inputData) {
57+
Workmanager().executeTask((task, inputData) async {
5858
5959
int? totalExecutions;
6060
final _sharedPreference = await SharedPreferences.getInstance(); //Initialize dependency

0 commit comments

Comments
 (0)