Commit 79242b4
[flutter_local_notifications] Add support for
* Add support for `providesAppNotificationSettings`
* Apply suggestions from code review
* Add providesAppNotificationSettings to iOS Example app
* Apply suggestions from code review
Co-authored-by: Michael Bui <25263378+MaikuB@users.noreply.github.com>
* Update flutter_local_notifications/example/lib/main.dart
* Extract the ConfigureInAppToggle widget
* Fix dcm lints
* Fix linting issues
All linting checks pass with Flutter 3.22.0 (project minimum version).
* Fixes macOS test: requests all settings
* Removes redundant test
Removes the redundant 'checkPermissions' tests.
The existing 'checkPermissions' tests already cover the functionality.
* Rename test description for clarity
* Run dart format on test files
Applied dart format to fix indentation.
* Update iOS/macOS platform check
Co-authored-by: Michael Bui <25263378+MaikuB@users.noreply.github.com>
* Wrap ConfigureInAppToggle with iOS-only check
The ConfigureInAppToggle widget should only appear on iOS, not macOS. This change wraps the widget with `if (Platform.isIOS)` so it's hidden on macOS while still being in the iOS/macOS shared examples section.
Addresses MaikuB's review feedback.
* Attempt to add providesAppNotificationSettings support for Macos Example app (doesn't work)
This commit is a proof-of-concept in which I attempted to implement and demonstrate whether configuring this "Configure in App" API on macOS has any actual effect (like it does on iOS): I can confirm, it does *not*.
Details:
Even with these modifications and corresponding macOS AppDelegate configuration, no such "Configure in App" option was visible upon right-clicking the notification in the macOS notification pane, as tested on macOS Tahoe 26.0.
Additionally, I could not find any examples on the web demonstrating this feature on macOS.
As such, while macOS does support the providesAppNotificationSettings API (likely for API symmetry with iOS, and for potential future compatibility), at the moment, this API does not result in any user-facing UI/UX change on macOS.
This commit will be reverted, but I'll preserve it in the branch as a record of the finding.
* Revert "Attempt to add providesAppNotificationSettings support for Macos Example app (doesn't work)"
This reverts commit 51f1e329bfa364023ab73144934a7638f1117af3.
* Clarify macOS limitation in README and API docs
Updates user-facing documentation to clarify that while providesAppNotificationSettings API is available on macOS 10.14+, the UI button does not appear in notification context menus in practice. The feature is fully functional on iOS 12+.
---------
Co-authored-by: Michael Bui <25263378+MaikuB@users.noreply.github.com>providesAppNotificationSettings (#2558)1 parent ecd66b1 commit 79242b4
13 files changed
Lines changed: 447 additions & 23 deletions
File tree
- flutter_local_notifications
- example
- ios/Runner
- lib
- ios/flutter_local_notifications/Sources/flutter_local_notifications
- lib/src
- platform_specifics/darwin
- macos/flutter_local_notifications/Sources/flutter_local_notifications
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
24 | 41 | | |
Lines changed: 117 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
229 | 253 | | |
230 | 254 | | |
231 | 255 | | |
| |||
848 | 872 | | |
849 | 873 | | |
850 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
851 | 884 | | |
852 | 885 | | |
853 | 886 | | |
| |||
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| |||
394 | 398 | | |
395 | 399 | | |
396 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
397 | 405 | | |
398 | 406 | | |
399 | 407 | | |
| |||
412 | 420 | | |
413 | 421 | | |
414 | 422 | | |
415 | | - | |
| 423 | + | |
| 424 | + | |
416 | 425 | | |
417 | 426 | | |
418 | 427 | | |
419 | 428 | | |
420 | 429 | | |
421 | | - | |
422 | 430 | | |
423 | 431 | | |
424 | 432 | | |
425 | 433 | | |
426 | 434 | | |
427 | 435 | | |
| 436 | + | |
428 | 437 | | |
429 | 438 | | |
430 | 439 | | |
| |||
440 | 449 | | |
441 | 450 | | |
442 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
443 | 455 | | |
444 | 456 | | |
445 | 457 | | |
446 | 458 | | |
447 | 459 | | |
| 460 | + | |
448 | 461 | | |
449 | 462 | | |
450 | 463 | | |
| |||
453 | 466 | | |
454 | 467 | | |
455 | 468 | | |
| 469 | + | |
456 | 470 | | |
457 | 471 | | |
458 | | - | |
| 472 | + | |
459 | 473 | | |
460 | 474 | | |
461 | 475 | | |
| |||
479 | 493 | | |
480 | 494 | | |
481 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
482 | 499 | | |
483 | 500 | | |
484 | 501 | | |
| |||
502 | 519 | | |
503 | 520 | | |
504 | 521 | | |
| 522 | + | |
505 | 523 | | |
506 | 524 | | |
507 | 525 | | |
508 | 526 | | |
509 | 527 | | |
510 | 528 | | |
| 529 | + | |
511 | 530 | | |
512 | 531 | | |
513 | 532 | | |
| |||
517 | 536 | | |
518 | 537 | | |
519 | 538 | | |
| 539 | + | |
520 | 540 | | |
521 | 541 | | |
522 | 542 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
703 | 704 | | |
704 | 705 | | |
705 | 706 | | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
709 | 710 | | |
| 711 | + | |
710 | 712 | | |
711 | 713 | | |
712 | 714 | | |
| |||
726 | 728 | | |
727 | 729 | | |
728 | 730 | | |
| 731 | + | |
| 732 | + | |
729 | 733 | | |
730 | 734 | | |
731 | 735 | | |
| |||
895 | 899 | | |
896 | 900 | | |
897 | 901 | | |
| 902 | + | |
898 | 903 | | |
899 | 904 | | |
900 | 905 | | |
901 | 906 | | |
902 | 907 | | |
903 | 908 | | |
904 | 909 | | |
| 910 | + | |
905 | 911 | | |
906 | 912 | | |
907 | 913 | | |
| |||
921 | 927 | | |
922 | 928 | | |
923 | 929 | | |
| 930 | + | |
| 931 | + | |
924 | 932 | | |
925 | 933 | | |
926 | 934 | | |
| |||
0 commit comments