Skip to content
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

[Material] Refactor _build<Widget> methods in BottomNavBar #26722

Merged
merged 3 commits into from
Jan 18, 2019

Conversation

johnsonmh
Copy link
Contributor

In the build method of _BottomNavigationTile, pull out the three _build... methods into stateless widgets.

  • _buildIcon() --> _TileIcon widget
  • _buildFixedLabel() --> _FixedLabel widget
  • _buildShiftingLabel() --> _ShiftingLabel widget

This is based on the advice that is now recommended, which is to favor extracting Stateless Widgets out of Build methods rather than functions.

Context: #19269

Note: This change is no-op

@gspencergoog
Copy link
Contributor

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@johnsonmh johnsonmh merged commit 6c07863 into flutter:master Jan 18, 2019
@johnsonmh johnsonmh deleted the fix-bottomNavBuildFunctions branch January 18, 2019 00:02
@zoechi zoechi added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jan 18, 2019
kangwang1988 pushed a commit to XianyuTech/flutter that referenced this pull request Feb 12, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants