diff --git a/packages/flutter_local_notifications_watchos/CHANGELOG.md b/packages/flutter_local_notifications_watchos/CHANGELOG.md index 7fcfbb0..c5154fc 100644 --- a/packages/flutter_local_notifications_watchos/CHANGELOG.md +++ b/packages/flutter_local_notifications_watchos/CHANGELOG.md @@ -27,7 +27,8 @@ physical watch. false when it asks for nothing. * On flutter_local_notifications 23 (`^23.0.2`), whose iOS-facing API is 22.3.2's. As upstream 23.0.2, a provisional request alone is asked for, - and granted without a prompt, instead of answering false. + and granted without a prompt when the user has not decided yet, instead of + answering false; after a denial the request answers false. * `providesAppNotificationSettings` is asked for and reported; `criticalSoundVolume` plays the default critical sound at that volume. * LICENSE carries Michael Bui's notice, as upstream's does. diff --git a/packages/flutter_local_notifications_watchos/PORTING_REPORT.md b/packages/flutter_local_notifications_watchos/PORTING_REPORT.md index 6883746..d9ffd0c 100644 --- a/packages/flutter_local_notifications_watchos/PORTING_REPORT.md +++ b/packages/flutter_local_notifications_watchos/PORTING_REPORT.md @@ -79,9 +79,11 @@ checks what upstream's does not reach on the watch: the permission flags, the launch details, and scheduling, listing and cancelling against the real notification center. The cases that need permission ask for it only with `--dart-define=FLNW_PROMPT=true`, when someone answers the prompt; without it -they are skipped and the suite asks for nothing, so it cannot hang. That -unattended run instead shows a notification without permission, which -checks the `UNErrorDomain` case above. The demo's "With actions" and +they are skipped. The one case that asks on an unattended run is the +provisional request, and provisional authorization shows no prompt, so it +cannot hang. That run also shows a notification without permission, which +checks the `UNErrorDomain` case above; it is skipped when the install already +holds full or provisional authorization, since `show` then succeeds. The demo's "With actions" and "Actions, no dismissal" buttons schedule the `lap` notifications the routing table above was checked with; its status line shows the last response. diff --git a/packages/flutter_local_notifications_watchos/example/integration_test/watchos_notifications_test.dart b/packages/flutter_local_notifications_watchos/example/integration_test/watchos_notifications_test.dart index 4368bc9..c141d05 100644 --- a/packages/flutter_local_notifications_watchos/example/integration_test/watchos_notifications_test.dart +++ b/packages/flutter_local_notifications_watchos/example/integration_test/watchos_notifications_test.dart @@ -8,8 +8,9 @@ // The cases that need permission to notify ask for it, which shows a system // prompt with no one to answer it on an unattended run, so they run only with // --dart-define=FLNW_PROMPT=true, where someone allows the prompt (a run -// installs the app afresh, so it comes back each time). Without it the suite -// asks for nothing and those cases are skipped. +// installs the app afresh, so it comes back each time). Without it those cases +// are skipped, and the one case that asks, the provisional request at the end, +// shows no prompt, so an unattended run cannot hang. // // Native hands every answer to Dart as JSON, and a flag that reaches JSON as // 1 instead of true reads as false in Dart. These tests read the flags from @@ -62,9 +63,10 @@ void main() { .resolvePlatformSpecificImplementation< IOSFlutterLocalNotificationsPlugin>()! .checkPermissions(); - if (options!.isEnabled) { - // Allowed on an earlier run that kept the install: nothing to check. - markTestSkipped('notifications are allowed, so none is refused'); + if (options!.isEnabled || options.isProvisionalEnabled) { + // Allowed, or provisionally allowed, on an earlier run that kept the + // install: show then succeeds, so the UNErrorDomain path is not reached. + markTestSkipped('notifications are already allowed, so none is refused'); return; } // With iOS details but no attachments, whose null once ended the app. diff --git a/tool/upstream_versions.yaml b/tool/upstream_versions.yaml index 1c793c6..545af7a 100644 --- a/tool/upstream_versions.yaml +++ b/tool/upstream_versions.yaml @@ -1,6 +1,7 @@ # The latest version of each upstream package on pub.dev, read from the # pub.dev API (latest.version) on 2026-09-30; the four Firebase upstreams on -# 2026-10-23, when their packages moved to the new majors. +# 2026-10-23, when their packages moved to the new majors; flutter_local_notifications +# on 2026-11-17. # # tool/bin/check_readme_snippets.dart holds every README install snippet to # it: an upstream constraint must be a caret constraint that admits this