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