Unverified Commit 8ca99327 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Corrected default tab indicator color (#15959)

parent eb9fc2ba
......@@ -691,7 +691,7 @@ class _TabBarState extends State<TabBar> {
// When that happens, automatic transitions of the theme will likely look
// ugly as the indicator color suddenly snaps to white at one end, but it's
// not clear how to avoid that any further.
if (color == Material.of(context).color)
if (color.value == Material.of(context).color.value)
color = Colors.white;
return new UnderlineTabIndicator(
......
......@@ -1721,4 +1721,15 @@ void main() {
));
});
testWidgets('Default tab indicator color is white', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/15958
final List<String> tabs = <String>['LEFT', 'RIGHT'];
await tester.pumpWidget(buildLeftRightApp(tabs: tabs, value: 'LEFT'));
final RenderBox tabBarBox = tester.firstRenderObject<RenderBox>(find.byType(TabBar));
expect(tabBarBox, paints..line(
color: Colors.white,
));
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment