Skip to content

Conversation

rkishan516
Copy link
Contributor

@rkishan516 rkishan516 commented Mar 6, 2025

Fix: CupertinoSheetTransition should set the SystemUIOverlayStyle in init state
fixes: #164633
Fixes #164134

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: cupertino flutter/packages/flutter/cupertino repository labels Mar 6, 2025
@rkishan516 rkishan516 changed the title Fix: SystemUIOverlayStyle based on theme Fix: CupertinoSheetTransition should change SystemUIOverlayStyle based on theme Mar 6, 2025
final bool isDarkMode = CupertinoTheme.brightnessOf(context) == Brightness.dark;
final Color overlayColor = isDarkMode ? const Color(0xFFc8c8c8) : const Color(0xFF000000);

SystemChrome.setSystemUIOverlayStyle(
isDarkMode ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite the correct function, as the sheet needs to set the SystemUIOverlayStyle to light regardless of theme. Since when the sheet is opened, the system UI overlay is always on a black background.

The problem is that this delegated transition is wrapped around the previous route, and does not go away when the sheet is popped. The delegated transition is waiting to be played again. It might be better to move the call to setSystemUIOverlayStyle to one of the sheet's build methods. Or wrap this call here with if (!secondaryAnimation.isDismissed) might work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, yes correct. So, it should be SystemUIOverlayStyle.light when sheet is visible. Otherwise inverse of theme.

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but needs a test.

@rkishan516 rkishan516 force-pushed the cupertino-sheet-route-system-ui-overlay branch 2 times, most recently from 5ad753e to f46c51b Compare March 19, 2025 03:02
@rkishan516 rkishan516 force-pushed the cupertino-sheet-route-system-ui-overlay branch from f46c51b to 12c213f Compare March 27, 2025 01:42
@rkishan516
Copy link
Contributor Author

@MitchellGoodwin Based on changes in #164675, I have also moved SystemChrome changes in sheet transition didChangeDependencies and dispose.

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the previous page has a dark navbar, it causes the system UI to flicker, as it's set to dark then back to light.

Screen.Recording.2025-04-01.at.2.26.56.PM.mov

I'm unsure if the sheet route needs to be concerned with the previous page at all. The previous page will set its system UI colors correctly if it uses an appbar or any widget with at the top of the screen AnnotatedRegion.

If I push a MaterialPageRoute on top of a screen with no navbar, then I get the same behavior as the sheet.

Screen.Recording.2025-04-01.at.3.07.36.PM.mov

void didChangeDependencies() {
super.didChangeDependencies();
_isDarkMode = CupertinoTheme.brightnessOf(context) == Brightness.dark;
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better for the sheet to only set the overlay style for the top of the screen. So:

SystemChrome.setSystemUIOverlayStyle(
  const SystemUiOverlayStyle(
    statusBarBrightness: Brightness.dark,
    statusBarIconBrightness: Brightness.light,
  ),
);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have pushed this change.

@rkishan516 rkishan516 force-pushed the cupertino-sheet-route-system-ui-overlay branch 3 times, most recently from e1796f8 to 785c1f9 Compare April 2, 2025 01:35
@rkishan516
Copy link
Contributor Author

rkishan516 commented Apr 2, 2025

If I push a MaterialPageRoute on top of a screen with no navbar, then I get the same behavior as the sheet.

Yaa, make sense.

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for the PR.

@MitchellGoodwin MitchellGoodwin changed the title Fix: CupertinoSheetTransition should change SystemUIOverlayStyle based on theme Fix: CupertinoSheetTransition moves SystemUIOverlayStyle to outside of delegatedTransition and only changes top bar Apr 2, 2025
@MitchellGoodwin
Copy link
Contributor

Fixes #164134

@dkwingsmt dkwingsmt requested a review from Piinks April 2, 2025 18:43
@override
void didChangeDependencies() {
super.didChangeDependencies();
SystemChrome.setSystemUIOverlayStyle(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be called every time the widget rebuilds?

should change SystemUIOverlayStyle based on theme

How is theme accounted for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder because it does not look like it changes or depends on anything. Would initState one and done be better?

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is theme accounted for?

It was in this PR originally, but that wasn't the correct behavior. It should set a static system overlay style, and leave it up to the previous page to overwrite it. See: #164680 (review)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder because it does not look like it changes or depends on anything. Would initState one and done be better?

Yaa, even i was thinking about it. Because now we don't use theme data for this change.

@rkishan516 rkishan516 force-pushed the cupertino-sheet-route-system-ui-overlay branch 4 times, most recently from a472141 to 36162cc Compare April 3, 2025 03:08
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I updated the PR description to reflect the actual result here.

@MitchellGoodwin MitchellGoodwin force-pushed the cupertino-sheet-route-system-ui-overlay branch from 36162cc to 4443b7e Compare April 7, 2025 18:24
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 10, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 10, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 10, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 10, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 10, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 10, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 10, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 10, 2025
Manual roll Flutter from 212064a to 9bf18f0 (32 revisions)

Manual roll requested by stuartmorgan@google.com

flutter/flutter@212064a...9bf18f0

2025-04-08 1063596+reidbaker@users.noreply.github.com bump warn agp version from 7.3 to 8.3 (flutter/flutter#166555)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 57a1644f0f8f to 7b929584566c (1 revision) (flutter/flutter#166760)
2025-04-08 matanlurey@users.noreply.github.com Enable a swath of `bringup: true` builds that were forgotten to the void. (flutter/flutter#166757)
2025-04-08 muhatashim@google.com add check for announcement support per platform (flutter/flutter#166099)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 515eb6238867 to 57a1644f0f8f (1 revision) (flutter/flutter#166748)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 3ea44c88d37b to 515eb6238867 (1 revision) (flutter/flutter#166742)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 7d56b9cc7ce9 to 3ea44c88d37b (1 revision) (flutter/flutter#166741)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 245d2b8fb042 to 7d56b9cc7ce9 (2 revisions) (flutter/flutter#166737)
2025-04-08 103958012+ahmedrasar@users.noreply.github.com Fix `DropdownMenu` keyboard navigation on filtered entries (flutter/flutter#165868)
2025-04-08 43089218+chika3742@users.noreply.github.com Fix: DraggableScrollableSheet may not close if snapping is enabled (flutter/flutter#165557)
2025-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#166503)
2025-04-08 dkwingsmt@users.noreply.github.com Add `RoundedSuperellipseBorder` and apply it to `CupertinoActionSheet` (flutter/flutter#166303)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from f493d403c01b to 245d2b8fb042 (3 revisions) (flutter/flutter#166720)
2025-04-07 yjbanov@google.com [web] reland fix text selection offset in multi-line fields (flutter/flutter#166714)
2025-04-07 58529443+srujzs@users.noreply.github.com [flutter_tools] Update dwds version to 24.3.10 (flutter/flutter#166699)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 5f0f9b76b975 to f493d403c01b (3 revisions) (flutter/flutter#166710)
2025-04-07 jason-simmons@users.noreply.github.com Roll HarfBuzz to 11.0.0 (flutter/flutter#166596)
2025-04-07 34465683+rkishan516@users.noreply.github.com Fix: CupertinoSheetTransition moves SystemUIOverlayStyle to outside of delegatedTransition and only changes top bar (flutter/flutter#164680)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (#166700)" (flutter/flutter#166711)
2025-04-07 bkonyi@google.com [ Widget Preview ] Update generated test files (flutter/flutter#166701)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 339ef4f48c29 to 5f0f9b76b975 (1 revision) (flutter/flutter#166690)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (flutter/flutter#166700)
2025-04-07 34871572+gmackall@users.noreply.github.com [reland] Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166676)
2025-04-07 bkonyi@google.com Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (flutter/flutter#166687)
2025-04-07 jessy.yameogo@gmail.com [Widget Preview] implemented gridview and listview layouts  (flutter/flutter#166150)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 966d9c665eed to 339ef4f48c29 (1 revision) (flutter/flutter#166680)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 8505be5b584e to 966d9c665eed (2 revisions) (flutter/flutter#166675)
2025-04-07 34465683+rkishan516@users.noreply.github.com Feat: Add yearShape property to DatePickerThemeData (flutter/flutter#163909)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Convert the Flutter Gradle Plugin entirely to Kotlin source (#166114)" (flutter/flutter#166666)
2025-04-07 34871572+gmackall@users.noreply.github.com Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166114)
2025-04-06 liama@google.com Make coverage collection aware of workspaces (flutter/flutter#166389)
2025-04-06 engine-flutter-autoroll@skia.org Roll Skia from da7929d79c28 to 8505be5b584e (1 revision) (flutter/flutter#166661)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
nick-llewellyn pushed a commit to labrystechnology/flutter_packages that referenced this pull request Apr 23, 2025
)

Manual roll Flutter from 212064a to 9bf18f0 (32 revisions)

Manual roll requested by stuartmorgan@google.com

flutter/flutter@212064a...9bf18f0

2025-04-08 1063596+reidbaker@users.noreply.github.com bump warn agp version from 7.3 to 8.3 (flutter/flutter#166555)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 57a1644f0f8f to 7b929584566c (1 revision) (flutter/flutter#166760)
2025-04-08 matanlurey@users.noreply.github.com Enable a swath of `bringup: true` builds that were forgotten to the void. (flutter/flutter#166757)
2025-04-08 muhatashim@google.com add check for announcement support per platform (flutter/flutter#166099)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 515eb6238867 to 57a1644f0f8f (1 revision) (flutter/flutter#166748)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 3ea44c88d37b to 515eb6238867 (1 revision) (flutter/flutter#166742)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 7d56b9cc7ce9 to 3ea44c88d37b (1 revision) (flutter/flutter#166741)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 245d2b8fb042 to 7d56b9cc7ce9 (2 revisions) (flutter/flutter#166737)
2025-04-08 103958012+ahmedrasar@users.noreply.github.com Fix `DropdownMenu` keyboard navigation on filtered entries (flutter/flutter#165868)
2025-04-08 43089218+chika3742@users.noreply.github.com Fix: DraggableScrollableSheet may not close if snapping is enabled (flutter/flutter#165557)
2025-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#166503)
2025-04-08 dkwingsmt@users.noreply.github.com Add `RoundedSuperellipseBorder` and apply it to `CupertinoActionSheet` (flutter/flutter#166303)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from f493d403c01b to 245d2b8fb042 (3 revisions) (flutter/flutter#166720)
2025-04-07 yjbanov@google.com [web] reland fix text selection offset in multi-line fields (flutter/flutter#166714)
2025-04-07 58529443+srujzs@users.noreply.github.com [flutter_tools] Update dwds version to 24.3.10 (flutter/flutter#166699)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 5f0f9b76b975 to f493d403c01b (3 revisions) (flutter/flutter#166710)
2025-04-07 jason-simmons@users.noreply.github.com Roll HarfBuzz to 11.0.0 (flutter/flutter#166596)
2025-04-07 34465683+rkishan516@users.noreply.github.com Fix: CupertinoSheetTransition moves SystemUIOverlayStyle to outside of delegatedTransition and only changes top bar (flutter/flutter#164680)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (#166700)" (flutter/flutter#166711)
2025-04-07 bkonyi@google.com [ Widget Preview ] Update generated test files (flutter/flutter#166701)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 339ef4f48c29 to 5f0f9b76b975 (1 revision) (flutter/flutter#166690)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (flutter/flutter#166700)
2025-04-07 34871572+gmackall@users.noreply.github.com [reland] Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166676)
2025-04-07 bkonyi@google.com Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (flutter/flutter#166687)
2025-04-07 jessy.yameogo@gmail.com [Widget Preview] implemented gridview and listview layouts  (flutter/flutter#166150)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 966d9c665eed to 339ef4f48c29 (1 revision) (flutter/flutter#166680)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 8505be5b584e to 966d9c665eed (2 revisions) (flutter/flutter#166675)
2025-04-07 34465683+rkishan516@users.noreply.github.com Feat: Add yearShape property to DatePickerThemeData (flutter/flutter#163909)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Convert the Flutter Gradle Plugin entirely to Kotlin source (#166114)" (flutter/flutter#166666)
2025-04-07 34871572+gmackall@users.noreply.github.com Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166114)
2025-04-06 liama@google.com Make coverage collection aware of workspaces (flutter/flutter#166389)
2025-04-06 engine-flutter-autoroll@skia.org Roll Skia from da7929d79c28 to 8505be5b584e (1 revision) (flutter/flutter#166661)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
github-merge-queue bot pushed a commit that referenced this pull request May 14, 2025
…#168182)

#164680 caused a regression where the systemUIStyle would not be set
correctly if the previous page has a navbar.


https://github.com/user-attachments/assets/656d171c-d768-4481-bf64-4c93463752a2

This happens because the RenderView is constantly watching for
AnnotatedRegions at the top of the bottom of the screen to set the UI
style. So the sheet when initialized would set the style, but during the
transition the previous pages navbar is still at the top of the screen,
so the RenderView immediately sets the style back to where it was.

This PR fixes that by adding an AnnotatedRegion behind the previous page
through the delegatedTransition with the style set correctly for the
sheet. That way when the previous page drops low enough, the systemUI
switches over.


https://github.com/user-attachments/assets/e600e23b-aad3-4059-9009-c3037a15a2bd

The RenderView is watching for right around the midpoint of the systemUI
so it switches back and forth at a good point when the transition is
manually dragged back and forth.



https://github.com/user-attachments/assets/a299c0fd-0bbe-40f2-b235-a593f8b5a885



## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
CodixNinja pushed a commit to CodixNinja/packages that referenced this pull request May 15, 2025
…(#9041)

Manual roll Flutter from 212064a3e558 to 9bf18f097137 (32 revisions)

Manual roll requested by stuartmorgan@google.com

flutter/flutter@212064a...9bf18f0

2025-04-08 1063596+reidbaker@users.noreply.github.com bump warn agp version from 7.3 to 8.3 (flutter/flutter#166555)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 57a1644f0f8f to 7b929584566c (1 revision) (flutter/flutter#166760)
2025-04-08 matanlurey@users.noreply.github.com Enable a swath of `bringup: true` builds that were forgotten to the void. (flutter/flutter#166757)
2025-04-08 muhatashim@google.com add check for announcement support per platform (flutter/flutter#166099)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 515eb6238867 to 57a1644f0f8f (1 revision) (flutter/flutter#166748)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 3ea44c88d37b to 515eb6238867 (1 revision) (flutter/flutter#166742)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 7d56b9cc7ce9 to 3ea44c88d37b (1 revision) (flutter/flutter#166741)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 245d2b8fb042 to 7d56b9cc7ce9 (2 revisions) (flutter/flutter#166737)
2025-04-08 103958012+ahmedrasar@users.noreply.github.com Fix `DropdownMenu` keyboard navigation on filtered entries (flutter/flutter#165868)
2025-04-08 43089218+chika3742@users.noreply.github.com Fix: DraggableScrollableSheet may not close if snapping is enabled (flutter/flutter#165557)
2025-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#166503)
2025-04-08 dkwingsmt@users.noreply.github.com Add `RoundedSuperellipseBorder` and apply it to `CupertinoActionSheet` (flutter/flutter#166303)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from f493d403c01b to 245d2b8fb042 (3 revisions) (flutter/flutter#166720)
2025-04-07 yjbanov@google.com [web] reland fix text selection offset in multi-line fields (flutter/flutter#166714)
2025-04-07 58529443+srujzs@users.noreply.github.com [flutter_tools] Update dwds version to 24.3.10 (flutter/flutter#166699)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 5f0f9b76b975 to f493d403c01b (3 revisions) (flutter/flutter#166710)
2025-04-07 jason-simmons@users.noreply.github.com Roll HarfBuzz to 11.0.0 (flutter/flutter#166596)
2025-04-07 34465683+rkishan516@users.noreply.github.com Fix: CupertinoSheetTransition moves SystemUIOverlayStyle to outside of delegatedTransition and only changes top bar (flutter/flutter#164680)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (#166700)" (flutter/flutter#166711)
2025-04-07 bkonyi@google.com [ Widget Preview ] Update generated test files (flutter/flutter#166701)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 339ef4f48c29 to 5f0f9b76b975 (1 revision) (flutter/flutter#166690)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (flutter/flutter#166700)
2025-04-07 34871572+gmackall@users.noreply.github.com [reland] Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166676)
2025-04-07 bkonyi@google.com Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (flutter/flutter#166687)
2025-04-07 jessy.yameogo@gmail.com [Widget Preview] implemented gridview and listview layouts  (flutter/flutter#166150)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 966d9c665eed to 339ef4f48c29 (1 revision) (flutter/flutter#166680)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 8505be5b584e to 966d9c665eed (2 revisions) (flutter/flutter#166675)
2025-04-07 34465683+rkishan516@users.noreply.github.com Feat: Add yearShape property to DatePickerThemeData (flutter/flutter#163909)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Convert the Flutter Gradle Plugin entirely to Kotlin source (#166114)" (flutter/flutter#166666)
2025-04-07 34871572+gmackall@users.noreply.github.com Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166114)
2025-04-06 liama@google.com Make coverage collection aware of workspaces (flutter/flutter#166389)
2025-04-06 engine-flutter-autoroll@skia.org Roll Skia from da7929d79c28 to 8505be5b584e (1 revision) (flutter/flutter#166661)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
…utside of delegatedTransition and only changes top bar (flutter/flutter#164680)
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
)

Manual roll Flutter from 212064a to 9bf18f0 (32 revisions)

Manual roll requested by stuartmorgan@google.com

flutter/flutter@212064a...9bf18f0

2025-04-08 1063596+reidbaker@users.noreply.github.com bump warn agp version from 7.3 to 8.3 (flutter/flutter#166555)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 57a1644f0f8f to 7b929584566c (1 revision) (flutter/flutter#166760)
2025-04-08 matanlurey@users.noreply.github.com Enable a swath of `bringup: true` builds that were forgotten to the void. (flutter/flutter#166757)
2025-04-08 muhatashim@google.com add check for announcement support per platform (flutter/flutter#166099)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 515eb6238867 to 57a1644f0f8f (1 revision) (flutter/flutter#166748)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 3ea44c88d37b to 515eb6238867 (1 revision) (flutter/flutter#166742)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 7d56b9cc7ce9 to 3ea44c88d37b (1 revision) (flutter/flutter#166741)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 245d2b8fb042 to 7d56b9cc7ce9 (2 revisions) (flutter/flutter#166737)
2025-04-08 103958012+ahmedrasar@users.noreply.github.com Fix `DropdownMenu` keyboard navigation on filtered entries (flutter/flutter#165868)
2025-04-08 43089218+chika3742@users.noreply.github.com Fix: DraggableScrollableSheet may not close if snapping is enabled (flutter/flutter#165557)
2025-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#166503)
2025-04-08 dkwingsmt@users.noreply.github.com Add `RoundedSuperellipseBorder` and apply it to `CupertinoActionSheet` (flutter/flutter#166303)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from f493d403c01b to 245d2b8fb042 (3 revisions) (flutter/flutter#166720)
2025-04-07 yjbanov@google.com [web] reland fix text selection offset in multi-line fields (flutter/flutter#166714)
2025-04-07 58529443+srujzs@users.noreply.github.com [flutter_tools] Update dwds version to 24.3.10 (flutter/flutter#166699)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 5f0f9b76b975 to f493d403c01b (3 revisions) (flutter/flutter#166710)
2025-04-07 jason-simmons@users.noreply.github.com Roll HarfBuzz to 11.0.0 (flutter/flutter#166596)
2025-04-07 34465683+rkishan516@users.noreply.github.com Fix: CupertinoSheetTransition moves SystemUIOverlayStyle to outside of delegatedTransition and only changes top bar (flutter/flutter#164680)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (#166700)" (flutter/flutter#166711)
2025-04-07 bkonyi@google.com [ Widget Preview ] Update generated test files (flutter/flutter#166701)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 339ef4f48c29 to 5f0f9b76b975 (1 revision) (flutter/flutter#166690)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (flutter/flutter#166700)
2025-04-07 34871572+gmackall@users.noreply.github.com [reland] Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166676)
2025-04-07 bkonyi@google.com Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (flutter/flutter#166687)
2025-04-07 jessy.yameogo@gmail.com [Widget Preview] implemented gridview and listview layouts  (flutter/flutter#166150)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 966d9c665eed to 339ef4f48c29 (1 revision) (flutter/flutter#166680)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 8505be5b584e to 966d9c665eed (2 revisions) (flutter/flutter#166675)
2025-04-07 34465683+rkishan516@users.noreply.github.com Feat: Add yearShape property to DatePickerThemeData (flutter/flutter#163909)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Convert the Flutter Gradle Plugin entirely to Kotlin source (#166114)" (flutter/flutter#166666)
2025-04-07 34871572+gmackall@users.noreply.github.com Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166114)
2025-04-06 liama@google.com Make coverage collection aware of workspaces (flutter/flutter#166389)
2025-04-06 engine-flutter-autoroll@skia.org Roll Skia from da7929d79c28 to 8505be5b584e (1 revision) (flutter/flutter#166661)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
zhangyuang pushed a commit to zhangyuang/flutter-fork that referenced this pull request Jun 9, 2025
…f delegatedTransition and only changes top bar (flutter#164680)

Fix: CupertinoSheetTransition should set the SystemUIOverlayStyle in
init state
fixes: flutter#164633 
Fixes flutter#164134

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
)

Manual roll Flutter from 212064a to 9bf18f0 (32 revisions)

Manual roll requested by stuartmorgan@google.com

flutter/flutter@212064a...9bf18f0

2025-04-08 1063596+reidbaker@users.noreply.github.com bump warn agp version from 7.3 to 8.3 (flutter/flutter#166555)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 57a1644f0f8f to 7b929584566c (1 revision) (flutter/flutter#166760)
2025-04-08 matanlurey@users.noreply.github.com Enable a swath of `bringup: true` builds that were forgotten to the void. (flutter/flutter#166757)
2025-04-08 muhatashim@google.com add check for announcement support per platform (flutter/flutter#166099)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 515eb6238867 to 57a1644f0f8f (1 revision) (flutter/flutter#166748)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 3ea44c88d37b to 515eb6238867 (1 revision) (flutter/flutter#166742)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 7d56b9cc7ce9 to 3ea44c88d37b (1 revision) (flutter/flutter#166741)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 245d2b8fb042 to 7d56b9cc7ce9 (2 revisions) (flutter/flutter#166737)
2025-04-08 103958012+ahmedrasar@users.noreply.github.com Fix `DropdownMenu` keyboard navigation on filtered entries (flutter/flutter#165868)
2025-04-08 43089218+chika3742@users.noreply.github.com Fix: DraggableScrollableSheet may not close if snapping is enabled (flutter/flutter#165557)
2025-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#166503)
2025-04-08 dkwingsmt@users.noreply.github.com Add `RoundedSuperellipseBorder` and apply it to `CupertinoActionSheet` (flutter/flutter#166303)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from f493d403c01b to 245d2b8fb042 (3 revisions) (flutter/flutter#166720)
2025-04-07 yjbanov@google.com [web] reland fix text selection offset in multi-line fields (flutter/flutter#166714)
2025-04-07 58529443+srujzs@users.noreply.github.com [flutter_tools] Update dwds version to 24.3.10 (flutter/flutter#166699)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 5f0f9b76b975 to f493d403c01b (3 revisions) (flutter/flutter#166710)
2025-04-07 jason-simmons@users.noreply.github.com Roll HarfBuzz to 11.0.0 (flutter/flutter#166596)
2025-04-07 34465683+rkishan516@users.noreply.github.com Fix: CupertinoSheetTransition moves SystemUIOverlayStyle to outside of delegatedTransition and only changes top bar (flutter/flutter#164680)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (#166700)" (flutter/flutter#166711)
2025-04-07 bkonyi@google.com [ Widget Preview ] Update generated test files (flutter/flutter#166701)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 339ef4f48c29 to 5f0f9b76b975 (1 revision) (flutter/flutter#166690)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (flutter/flutter#166700)
2025-04-07 34871572+gmackall@users.noreply.github.com [reland] Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166676)
2025-04-07 bkonyi@google.com Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (flutter/flutter#166687)
2025-04-07 jessy.yameogo@gmail.com [Widget Preview] implemented gridview and listview layouts  (flutter/flutter#166150)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 966d9c665eed to 339ef4f48c29 (1 revision) (flutter/flutter#166680)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 8505be5b584e to 966d9c665eed (2 revisions) (flutter/flutter#166675)
2025-04-07 34465683+rkishan516@users.noreply.github.com Feat: Add yearShape property to DatePickerThemeData (flutter/flutter#163909)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Convert the Flutter Gradle Plugin entirely to Kotlin source (#166114)" (flutter/flutter#166666)
2025-04-07 34871572+gmackall@users.noreply.github.com Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166114)
2025-04-06 liama@google.com Make coverage collection aware of workspaces (flutter/flutter#166389)
2025-04-06 engine-flutter-autoroll@skia.org Roll Skia from da7929d79c28 to 8505be5b584e (1 revision) (flutter/flutter#166661)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
)

Manual roll Flutter from 212064a to 9bf18f0 (32 revisions)

Manual roll requested by stuartmorgan@google.com

flutter/flutter@212064a...9bf18f0

2025-04-08 1063596+reidbaker@users.noreply.github.com bump warn agp version from 7.3 to 8.3 (flutter/flutter#166555)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 57a1644f0f8f to 7b929584566c (1 revision) (flutter/flutter#166760)
2025-04-08 matanlurey@users.noreply.github.com Enable a swath of `bringup: true` builds that were forgotten to the void. (flutter/flutter#166757)
2025-04-08 muhatashim@google.com add check for announcement support per platform (flutter/flutter#166099)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 515eb6238867 to 57a1644f0f8f (1 revision) (flutter/flutter#166748)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 3ea44c88d37b to 515eb6238867 (1 revision) (flutter/flutter#166742)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 7d56b9cc7ce9 to 3ea44c88d37b (1 revision) (flutter/flutter#166741)
2025-04-08 engine-flutter-autoroll@skia.org Roll Skia from 245d2b8fb042 to 7d56b9cc7ce9 (2 revisions) (flutter/flutter#166737)
2025-04-08 103958012+ahmedrasar@users.noreply.github.com Fix `DropdownMenu` keyboard navigation on filtered entries (flutter/flutter#165868)
2025-04-08 43089218+chika3742@users.noreply.github.com Fix: DraggableScrollableSheet may not close if snapping is enabled (flutter/flutter#165557)
2025-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#166503)
2025-04-08 dkwingsmt@users.noreply.github.com Add `RoundedSuperellipseBorder` and apply it to `CupertinoActionSheet` (flutter/flutter#166303)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from f493d403c01b to 245d2b8fb042 (3 revisions) (flutter/flutter#166720)
2025-04-07 yjbanov@google.com [web] reland fix text selection offset in multi-line fields (flutter/flutter#166714)
2025-04-07 58529443+srujzs@users.noreply.github.com [flutter_tools] Update dwds version to 24.3.10 (flutter/flutter#166699)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 5f0f9b76b975 to f493d403c01b (3 revisions) (flutter/flutter#166710)
2025-04-07 jason-simmons@users.noreply.github.com Roll HarfBuzz to 11.0.0 (flutter/flutter#166596)
2025-04-07 34465683+rkishan516@users.noreply.github.com Fix: CupertinoSheetTransition moves SystemUIOverlayStyle to outside of delegatedTransition and only changes top bar (flutter/flutter#164680)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (#166700)" (flutter/flutter#166711)
2025-04-07 bkonyi@google.com [ Widget Preview ] Update generated test files (flutter/flutter#166701)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 339ef4f48c29 to 5f0f9b76b975 (1 revision) (flutter/flutter#166690)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (#166687)" (flutter/flutter#166700)
2025-04-07 34871572+gmackall@users.noreply.github.com [reland] Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166676)
2025-04-07 bkonyi@google.com Remove `bringup:true` from Linux tool_tests_widget_preview_scaffold (flutter/flutter#166687)
2025-04-07 jessy.yameogo@gmail.com [Widget Preview] implemented gridview and listview layouts  (flutter/flutter#166150)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 966d9c665eed to 339ef4f48c29 (1 revision) (flutter/flutter#166680)
2025-04-07 engine-flutter-autoroll@skia.org Roll Skia from 8505be5b584e to 966d9c665eed (2 revisions) (flutter/flutter#166675)
2025-04-07 34465683+rkishan516@users.noreply.github.com Feat: Add yearShape property to DatePickerThemeData (flutter/flutter#163909)
2025-04-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Convert the Flutter Gradle Plugin entirely to Kotlin source (#166114)" (flutter/flutter#166666)
2025-04-07 34871572+gmackall@users.noreply.github.com Convert the Flutter Gradle Plugin entirely to Kotlin source (flutter/flutter#166114)
2025-04-06 liama@google.com Make coverage collection aware of workspaces (flutter/flutter#166389)
2025-04-06 engine-flutter-autoroll@skia.org Roll Skia from da7929d79c28 to 8505be5b584e (1 revision) (flutter/flutter#166661)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
@lucasjinreal
Copy link

when will this fix avaliable in flutter stable?

@rkishan516
Copy link
Contributor Author

when will this fix avaliable in flutter stable?

Hey @lucasjinreal, this is already available in current stable channel i.e. v3.32.7

@lucasjinreal
Copy link

I still got the status bar color didn't change back in v3.32.7

what am missing further? ( i think this should be a default behavior when use with cupertinosheetroute)

@MitchellGoodwin
Copy link
Contributor

If the previous page doesn't set a status bar color in some way, then it won't revert back. This is usually done by app bars, or by setting an AnnotatedRegion. There's no way for a widget like CupertinoSheetRoute to know what the previous systemUI settings were and revert to it when going backwards, the previous page has to set it itself when it returns to being the main page. See https://api.flutter.dev/flutter/services/SystemChrome/setSystemUIOverlayStyle.html

@lucasjinreal
Copy link

thanks for the reply but i have set the backgroundColor of previous page.

CupertinoNavigationBar(
border: null,
backgroundColor: PlatformTheme.getMainBkColor(context),
previousPageTitle: isOnMobile()
? widget.boardData != null
? widget.boardData!.board.title
: "记忆"
: null,
automaticallyImplyLeading: true,
trailing: _buildBarTrailing())

isn't that enough

@lucasjinreal
Copy link

I tried set the systemUIOverlay, still **can not ** revert back:

 AnnotatedRegion<SystemUiOverlayStyle>(
              value: SystemUiOverlayStyle.light,
              child: MyCupertinoScaffold(
                  backgroundColor: PlatformTheme.getMainBkColor(context),
                  mainColor: mainColor ?? tClrPrimary(context),
                  appBar: isOnMobile()
                      ? CupertinoNavigationBar(
                          border: null,
                          backgroundColor:
                              PlatformTheme.getMainBkColor(context),
                          previousPageTitle: isOnMobile()
                              ? widget.boardData != null
                                  ? widget.boardData!.board.title
                                  : "记忆"
                              : null,
                          automaticallyImplyLeading: true,
                          trailing: _buildBarTrailing())

Both light and black were tried.

@MitchellGoodwin
Copy link
Contributor

Try setting brightness of CupertinoNavigationBar to the brightness of the backgroundColor. It tries to calculate the brightness of the background color when it's not provided, but it may not be correctly getting it. In your second code sample, the AnnotatedRegion you are adding is likely being covered up by the AnnotatedRegion added by CupertinoNavigationBar, so it's not doing anything.

@lucasjinreal
Copy link

Try setting brightness of CupertinoNavigationBar to the brightness of the backgroundColor.

Hi, can u kindly give me some example code how to set it? I have set the background color of it. is this correct>?

remove systemOverlayUIStyle

CupertinoNavigationBar(
                          border: null,
                          backgroundColor: Colors.white,
                          previousPageTitle: isOnMobile()
                              ? widget.boardData != null
                                  ? widget.boardData!.board.title
                                  : "记忆"
                              : null,
                          automaticallyImplyLeading: true,
                          trailing: _buildBarTrailing())

will it revert back?

@MitchellGoodwin
Copy link
Contributor

Hi, can u kindly give me some example code how to set it? I have set the background color of it. is this correct>?

brightness is a property on the NavBar.

CupertinoNavigationBar(
  border: null,
  backgroundColor: Colors.white,
  brightness: Brightness.light,
  previousPageTitle: isOnMobile()
    ? widget.boardData != null
      ? widget.boardData!.board.title
      : "记忆"
    : null,
  automaticallyImplyLeading: true,
  automaticBackgroundVisibility: false,
  trailing: _buildBarTrailing())

If not set it tries and set itself by calculating the luminance of backgroundColor, so it works by itself in most cases. Colors.white should work as expected. Setting automaticBackgroundVisibility to false would also be good just to debug that it's working as expected.

It's worth pointing out that #168182 changes how this logic works again for an improvement, but the system UI still needs to be set back once the sheet closes by the previous page. That PR is currently on the Beta release.

romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
…f delegatedTransition and only changes top bar (flutter#164680)

Fix: CupertinoSheetTransition should set the SystemUIOverlayStyle in
init state
fixes: flutter#164633 
Fixes flutter#164134

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iOS] CupertinoSheetRoute doesn't reset SystemUiOverlayStyle when closed [Android] showCupertinoSheet change navigation theme on android
4 participants