Skip to content

[Material] Create TabBarTheme.of constructor#23702

Merged
johnsonmh merged 3 commits intoflutter:masterfrom
johnsonmh:fix-tabBarTheme
Oct 30, 2018
Merged

[Material] Create TabBarTheme.of constructor#23702
johnsonmh merged 3 commits intoflutter:masterfrom
johnsonmh:fix-tabBarTheme

Conversation

@johnsonmh
Copy link
Contributor

  • Widget themes should have of(context) constructor.
  • The underlying widgets should get the themes from the of(context) constructors.

Do

tab_bar_theme.dart

static TabBarTheme of(BuildContext build) { ... }

tabs.dart

TabBarTheme tabBarTheme = TabBarTheme.of(context);

Don't

tabs.dart

TabBarTheme tabBarTheme = Theme.of(context).tabBarTheme;

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

@johnsonmh johnsonmh merged commit b8c3e0d into flutter:master Oct 30, 2018
@johnsonmh johnsonmh deleted the fix-tabBarTheme branch October 30, 2018 23:13
Xavjer pushed a commit to Xavjer/flutter that referenced this pull request Nov 1, 2018
* Create TabBarTheme of(...) constructor

* First round comments

* fix imports
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants