fix: upgrade workmanager 0.5.2 → 0.9.0+3 to fix Kotlin 2.x compile error
workmanager 0.5.2 references the removed PluginRegistrantCallback and other V1 Flutter embedding APIs, causing a Kotlin compilation failure when building the release AAB with AGP 8.11.1 / Kotlin 2.2.20. 0.9.x uses only V2 embedding. API migration: ExistingWorkPolicy → ExistingPeriodicWorkPolicy for registerPeriodicTask. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1d93eb10f3
commit
ea62c94c83
@@ -38,7 +38,7 @@ Future<void> registerBackgroundSync() async {
|
||||
_kTaskName,
|
||||
frequency: const Duration(minutes: 15),
|
||||
constraints: Constraints(networkType: NetworkType.connected),
|
||||
existingWorkPolicy: ExistingWorkPolicy.keep,
|
||||
existingWorkPolicy: ExistingPeriodicWorkPolicy.keep,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ dependencies:
|
||||
|
||||
# Background sync and local notifications
|
||||
flutter_local_notifications: ^18.0.1
|
||||
workmanager: ^0.5.2
|
||||
workmanager: ^0.9.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user