Unverified Commit 2820d21c authored by Darren Austin's avatar Darren Austin Committed by GitHub

Removed TabPageSelector accentColor dependency. (#77997)

parent f0fca7de
...@@ -1577,7 +1577,7 @@ class TabPageSelector extends StatelessWidget { ...@@ -1577,7 +1577,7 @@ class TabPageSelector extends StatelessWidget {
/// for all indicator circles. /// for all indicator circles.
/// ///
/// If this parameter is null, then the indicator is filled with the theme's /// If this parameter is null, then the indicator is filled with the theme's
/// accent color, [ThemeData.accentColor]. /// [ColorScheme.secondary].
final Color? selectedColor; final Color? selectedColor;
Widget _buildTabIndicator( Widget _buildTabIndicator(
...@@ -1620,7 +1620,7 @@ class TabPageSelector extends StatelessWidget { ...@@ -1620,7 +1620,7 @@ class TabPageSelector extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final Color fixColor = color ?? Colors.transparent; final Color fixColor = color ?? Colors.transparent;
final Color fixSelectedColor = selectedColor ?? Theme.of(context).accentColor; final Color fixSelectedColor = selectedColor ?? Theme.of(context).colorScheme.secondary;
final ColorTween selectedColorTween = ColorTween(begin: fixColor, end: fixSelectedColor); final ColorTween selectedColorTween = ColorTween(begin: fixColor, end: fixSelectedColor);
final ColorTween previousColorTween = ColorTween(begin: fixSelectedColor, end: fixColor); final ColorTween previousColorTween = ColorTween(begin: fixSelectedColor, end: fixColor);
final TabController? tabController = controller ?? DefaultTabController.of(context); final TabController? tabController = controller ?? DefaultTabController.of(context);
......
...@@ -12,7 +12,7 @@ Widget buildFrame(TabController tabController, { Color? color, Color? selectedCo ...@@ -12,7 +12,7 @@ Widget buildFrame(TabController tabController, { Color? color, Color? selectedCo
return Directionality( return Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: Theme( child: Theme(
data: ThemeData(accentColor: kSelectedColor), data: ThemeData(colorScheme: const ColorScheme.light().copyWith(secondary: kSelectedColor)),
child: SizedBox.expand( child: SizedBox.expand(
child: Center( child: Center(
child: SizedBox( child: SizedBox(
......
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