-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Support RTL Cupertino nav bar transitions between routes #23221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -1528,7 +1532,8 @@ class _NavigationBarComponentsTransition { | |||
topLargeExpanded = topNavBar.largeExpanded, | |||
transitionBox = | |||
// paintBounds are based on offset zero so it's ok to expand the Rects. | |||
bottomNavBar.renderBox.paintBounds.expandToInclude(topNavBar.renderBox.paintBounds); | |||
bottomNavBar.renderBox.paintBounds.expandToInclude(topNavBar.renderBox.paintBounds), | |||
forwardDirection = directionality == TextDirection.ltr ? 1.0 : -1.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test for rtl rather than ltr, that way in the unlikely event that we add a value to TextDirection, this will fail more obviously for us people who use LTR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my math is likely failing me but I don't think there's a concise way of arranging this such that on a new enum value, the ltr outcome ends up with a wrong / non-1.0
value is there?
await tester.pump(const Duration(milliseconds: 150)); | ||
|
||
checkOpacity( | ||
tester, flying(tester, find.text('Page 2')), 0.6753286570310593); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no need to wrap here, but if you do, use flutter style wrapping so it's easier to see where the expression ends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleaned up here and above
#9446