File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ See sample folder for a complete working example.
2323Before 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+
2627void callbackDispatcher() {
2728 Workmanager().executeTask((task, inputData) {
2829 print("Native called background task: $backgroundTask"); //simpleTask will be emitted here.
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const simplePeriodicTask =
1818const simplePeriodic1HourTask =
1919 "be.tramckrijte.workmanagerExample.simplePeriodic1HourTask" ;
2020
21+ @pragma ('vm:entry-point' ) // Mandatory if the App is obfuscated or using Flutter 3.1+
2122void callbackDispatcher () {
2223 Workmanager ().executeTask ((task, inputData) async {
2324 switch (task) {
You can’t perform that action at this time.
0 commit comments