-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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] TabBarTheme text style parameters #26533
Conversation
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.
Looks good. Just asking for a few tweaks.
@@ -20,9 +20,9 @@ const List<Tab> _tabs = <Tab>[ | |||
Tab(text: _tab3Text, icon: Icon(Icons.looks_3)), | |||
]; | |||
|
|||
Widget _buildTabBar({ List<Tab> tabs = _tabs }) { | |||
final TabController _tabController = TabController(length: 3, vsync: const TestVSync()); | |||
final TabController _tabController = TabController(length: 3, vsync: const TestVSync()); |
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.
This change is subtly different. Now all of the tab test share the same tab controller which reduces isolation. I don't think that's what we want...
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.
Good point, changed this to a getter, that way every caller gets a new instance of TabController
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.
LGTM with some trivial tweaks.
…ure-tabTextStyles
…ure-tabTextStyles
* Add labelStyle + unselectedLabelStyle to TabBarTheme
Add
labelStyle
andunselectedLabelStyle
parameters to theTabBarTheme
. This will allow users to specify text themes for all the tab bars in their apps.Both of these fields already existed on the
TabBar
class itself.