Skip to content

Commit 80518ed

Browse files
authored
* Documentation and example update to fix (#374) WorkManager not working when App is obfuscated or using Flutter 3.1+ (#405)
1 parent 0fe2699 commit 80518ed

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# next
2+
3+
* Documentation and example update to fix (#374) WorkManager not working when App is obfuscated or using Flutter 3.1+
4+
15
# 0.5.0
26

37
* Android: Remove jetifier from example

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ See sample folder for a complete working example.
2323
Before registering any task, the WorkManager plugin must be initialized.
2424

2525
```dart
26+
@pragma('vm:entry-point') // Mandatory if the App is obfuscated or using Flutter 3.1+
2627
void callbackDispatcher() {
2728
Workmanager().executeTask((task, inputData) {
2829
print("Native called background task: $backgroundTask"); //simpleTask will be emitted here.

example/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const simplePeriodicTask =
1818
const simplePeriodic1HourTask =
1919
"be.tramckrijte.workmanagerExample.simplePeriodic1HourTask";
2020

21+
@pragma('vm:entry-point') // Mandatory if the App is obfuscated or using Flutter 3.1+
2122
void callbackDispatcher() {
2223
Workmanager().executeTask((task, inputData) async {
2324
switch (task) {

0 commit comments

Comments
 (0)