Removed TabPageSelector accentColor dependency. (#77997)
This commit is contained in:
parent
f0fca7de8b
commit
2820d21cd0
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user