Unverified Commit 4c104eff authored by Darren Austin's avatar Darren Austin Committed by GitHub

Removed references to deprecated styleFrom parameters. (#108401)

parent 7e683c02
...@@ -75,7 +75,7 @@ import 'theme_data.dart'; ...@@ -75,7 +75,7 @@ import 'theme_data.dart';
/// ///
/// ```dart /// ```dart
/// TextButton( /// TextButton(
/// style: TextButton.styleFrom(primary: Colors.green), /// style: TextButton.styleFrom(foregroundColor: Colors.green),
/// ) /// )
/// ``` /// ```
/// ///
...@@ -85,7 +85,7 @@ import 'theme_data.dart'; ...@@ -85,7 +85,7 @@ import 'theme_data.dart';
/// MaterialApp( /// MaterialApp(
/// theme: ThemeData( /// theme: ThemeData(
/// textButtonTheme: TextButtonThemeData( /// textButtonTheme: TextButtonThemeData(
/// style: TextButton.styleFrom(primary: Colors.green), /// style: TextButton.styleFrom(foregroundColor: Colors.green),
/// ), /// ),
/// ), /// ),
/// home: MyAppHome(), /// home: MyAppHome(),
......
...@@ -325,7 +325,7 @@ class _DesktopTextSelectionToolbarButton extends StatelessWidget { ...@@ -325,7 +325,7 @@ class _DesktopTextSelectionToolbarButton extends StatelessWidget {
// TODO(hansmuller): Should be colorScheme.onSurface // TODO(hansmuller): Should be colorScheme.onSurface
final ThemeData theme = Theme.of(context); final ThemeData theme = Theme.of(context);
final bool isDark = theme.colorScheme.brightness == Brightness.dark; final bool isDark = theme.colorScheme.brightness == Brightness.dark;
final Color primary = isDark ? Colors.white : Colors.black87; final Color foregroundColor = isDark ? Colors.white : Colors.black87;
return SizedBox( return SizedBox(
width: double.infinity, width: double.infinity,
...@@ -334,7 +334,7 @@ class _DesktopTextSelectionToolbarButton extends StatelessWidget { ...@@ -334,7 +334,7 @@ class _DesktopTextSelectionToolbarButton extends StatelessWidget {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
enabledMouseCursor: SystemMouseCursors.basic, enabledMouseCursor: SystemMouseCursors.basic,
disabledMouseCursor: SystemMouseCursors.basic, disabledMouseCursor: SystemMouseCursors.basic,
primary: primary, foregroundColor: foregroundColor,
shape: const RoundedRectangleBorder(), shape: const RoundedRectangleBorder(),
minimumSize: const Size(kMinInteractiveDimension, 36.0), minimumSize: const Size(kMinInteractiveDimension, 36.0),
padding: _kToolbarButtonPadding, padding: _kToolbarButtonPadding,
......
...@@ -100,14 +100,12 @@ class ElevatedButton extends ButtonStyleButton { ...@@ -100,14 +100,12 @@ class ElevatedButton extends ButtonStyleButton {
/// A static convenience method that constructs an elevated button /// A static convenience method that constructs an elevated button
/// [ButtonStyle] given simple values. /// [ButtonStyle] given simple values.
/// ///
/// The [onPrimary], and [onSurface] colors are used to create a /// The [foregroundColor] and [disabledForegroundColor] colors are used
/// [MaterialStateProperty] [ButtonStyle.foregroundColor] value in the same /// to create a [MaterialStateProperty] [ButtonStyle.foregroundColor], and
/// way that [defaultStyleOf] uses the [ColorScheme] colors with the same /// a derived [ButtonStyle.overlayColor].
/// names. Specify a value for [onPrimary] to specify the color of the ///
/// button's text and icons as well as the overlay colors used to indicate the /// The [backgroundColor] and [disabledBackgroundColor] colors are
/// hover, focus, and pressed states. Use [primary] for the button's background /// used to create a [MaterialStateProperty] [ButtonStyle.backgroundColor].
/// fill color and [onSurface] to specify the button's disabled text, icon,
/// and fill color.
/// ///
/// The button's elevations are defined relative to the [elevation] /// The button's elevations are defined relative to the [elevation]
/// parameter. The disabled elevation is the same as the parameter /// parameter. The disabled elevation is the same as the parameter
...@@ -131,9 +129,18 @@ class ElevatedButton extends ButtonStyleButton { ...@@ -131,9 +129,18 @@ class ElevatedButton extends ButtonStyleButton {
/// ///
/// ```dart /// ```dart
/// ElevatedButton( /// ElevatedButton(
/// style: ElevatedButton.styleFrom(primary: Colors.green), /// style: ElevatedButton.styleFrom(foregroundColor: Colors.green),
/// )
/// ```
///
/// And to change the fill color:
///
/// ```dart
/// ElevatedButton(
/// style: ElevatedButton.styleFrom(backgroundColor: Colors.green),
/// ) /// )
/// ``` /// ```
///
static ButtonStyle styleFrom({ static ButtonStyle styleFrom({
Color? foregroundColor, Color? foregroundColor,
Color? backgroundColor, Color? backgroundColor,
......
...@@ -103,13 +103,13 @@ class OutlinedButton extends ButtonStyleButton { ...@@ -103,13 +103,13 @@ class OutlinedButton extends ButtonStyleButton {
/// A static convenience method that constructs an outlined button /// A static convenience method that constructs an outlined button
/// [ButtonStyle] given simple values. /// [ButtonStyle] given simple values.
/// ///
/// The [primary], and [onSurface] colors are used to create a ///
/// [MaterialStateProperty] [ButtonStyle.foregroundColor] value in the same /// The [foregroundColor] and [disabledForegroundColor] colors are used
/// way that [defaultStyleOf] uses the [ColorScheme] colors with the same /// to create a [MaterialStateProperty] [ButtonStyle.foregroundColor], and
/// names. Specify a value for [primary] to specify the color of the button's /// a derived [ButtonStyle.overlayColor].
/// text and icons as well as the overlay colors used to indicate the hover, ///
/// focus, and pressed states. Use [onSurface] to specify the button's /// The [backgroundColor] and [disabledBackgroundColor] colors are
/// disabled text and icon color. /// used to create a [MaterialStateProperty] [ButtonStyle.backgroundColor].
/// ///
/// Similarly, the [enabledMouseCursor] and [disabledMouseCursor] /// Similarly, the [enabledMouseCursor] and [disabledMouseCursor]
/// parameters are used to construct [ButtonStyle.mouseCursor]. /// parameters are used to construct [ButtonStyle.mouseCursor].
......
...@@ -518,7 +518,7 @@ class _SnackBarState extends State<SnackBar> { ...@@ -518,7 +518,7 @@ class _SnackBarState extends State<SnackBar> {
child: TextButtonTheme( child: TextButtonTheme(
data: TextButtonThemeData( data: TextButtonThemeData(
style: TextButton.styleFrom( style: TextButton.styleFrom(
primary: buttonColor, foregroundColor: buttonColor,
padding: EdgeInsets.symmetric(horizontal: horizontalPadding), padding: EdgeInsets.symmetric(horizontal: horizontalPadding),
), ),
), ),
......
...@@ -532,7 +532,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin { ...@@ -532,7 +532,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
child: TextButton( child: TextButton(
onPressed: widget.onStepCancel, onPressed: widget.onStepCancel,
style: TextButton.styleFrom( style: TextButton.styleFrom(
primary: cancelColor, foregroundColor: cancelColor,
padding: buttonPadding, padding: buttonPadding,
shape: buttonShape, shape: buttonShape,
), ),
......
...@@ -112,13 +112,12 @@ class TextButton extends ButtonStyleButton { ...@@ -112,13 +112,12 @@ class TextButton extends ButtonStyleButton {
/// A static convenience method that constructs a text button /// A static convenience method that constructs a text button
/// [ButtonStyle] given simple values. /// [ButtonStyle] given simple values.
/// ///
/// The [primary], and [onSurface] colors are used to create a /// The [foregroundColor] and [disabledForegroundColor] colors are used
/// [MaterialStateProperty] [ButtonStyle.foregroundColor] value in the same /// to create a [MaterialStateProperty] [ButtonStyle.foregroundColor], and
/// way that [defaultStyleOf] uses the [ColorScheme] colors with the same /// a derived [ButtonStyle.overlayColor].
/// names. Specify a value for [primary] to specify the color of the button's ///
/// text and icons as well as the overlay colors used to indicate the hover, /// The [backgroundColor] and [disabledBackgroundColor] colors are
/// focus, and pressed states. Use [onSurface] to specify the button's /// used to create a [MaterialStateProperty] [ButtonStyle.backgroundColor].
/// disabled text and icon color.
/// ///
/// Similarly, the [enabledMouseCursor] and [disabledMouseCursor] /// Similarly, the [enabledMouseCursor] and [disabledMouseCursor]
/// parameters are used to construct [ButtonStyle.mouseCursor]. /// parameters are used to construct [ButtonStyle.mouseCursor].
...@@ -137,7 +136,7 @@ class TextButton extends ButtonStyleButton { ...@@ -137,7 +136,7 @@ class TextButton extends ButtonStyleButton {
/// ///
/// ```dart /// ```dart
/// TextButton( /// TextButton(
/// style: TextButton.styleFrom(primary: Colors.green), /// style: TextButton.styleFrom(foregroundColor: Colors.green),
/// ) /// )
/// ``` /// ```
static ButtonStyle styleFrom({ static ButtonStyle styleFrom({
......
...@@ -109,11 +109,11 @@ class TextSelectionToolbarTextButton extends StatelessWidget { ...@@ -109,11 +109,11 @@ class TextSelectionToolbarTextButton extends StatelessWidget {
// TODO(hansmuller): Should be colorScheme.onSurface // TODO(hansmuller): Should be colorScheme.onSurface
final ThemeData theme = Theme.of(context); final ThemeData theme = Theme.of(context);
final bool isDark = theme.colorScheme.brightness == Brightness.dark; final bool isDark = theme.colorScheme.brightness == Brightness.dark;
final Color primary = isDark ? Colors.white : Colors.black87; final Color foregroundColor = isDark ? Colors.white : Colors.black87;
return TextButton( return TextButton(
style: TextButton.styleFrom( style: TextButton.styleFrom(
primary: primary, foregroundColor: foregroundColor,
shape: const RoundedRectangleBorder(), shape: const RoundedRectangleBorder(),
minimumSize: const Size(kMinInteractiveDimension, kMinInteractiveDimension), minimumSize: const Size(kMinInteractiveDimension, kMinInteractiveDimension),
padding: padding, padding: padding,
......
...@@ -44,10 +44,10 @@ void main() { ...@@ -44,10 +44,10 @@ void main() {
}); });
group('[Theme, TextTheme, ElevatedButton style overrides]', () { group('[Theme, TextTheme, ElevatedButton style overrides]', () {
const Color primaryColor = Color(0xff000001); const Color foregroundColor = Color(0xff000001);
const Color onSurfaceColor = Color(0xff000002); const Color backgroundColor = Color(0xff000002);
const Color disabledColor = Color(0xff000003);
const Color shadowColor = Color(0xff000004); const Color shadowColor = Color(0xff000004);
const Color onPrimaryColor = Color(0xff000005);
const double elevation = 1; const double elevation = 1;
const TextStyle textStyle = TextStyle(fontSize: 12.0); const TextStyle textStyle = TextStyle(fontSize: 12.0);
const EdgeInsets padding = EdgeInsets.all(3); const EdgeInsets padding = EdgeInsets.all(3);
...@@ -62,9 +62,10 @@ void main() { ...@@ -62,9 +62,10 @@ void main() {
const AlignmentGeometry alignment = Alignment.centerLeft; const AlignmentGeometry alignment = Alignment.centerLeft;
final ButtonStyle style = ElevatedButton.styleFrom( final ButtonStyle style = ElevatedButton.styleFrom(
primary: primaryColor, foregroundColor: foregroundColor,
onPrimary: onPrimaryColor, disabledForegroundColor: disabledColor,
onSurface: onSurfaceColor, backgroundColor: backgroundColor,
disabledBackgroundColor: disabledColor,
shadowColor: shadowColor, shadowColor: shadowColor,
elevation: elevation, elevation: elevation,
textStyle: textStyle, textStyle: textStyle,
...@@ -126,16 +127,16 @@ void main() { ...@@ -126,16 +127,16 @@ void main() {
void checkButton(WidgetTester tester) { void checkButton(WidgetTester tester) {
final Material material = tester.widget<Material>(findMaterial); final Material material = tester.widget<Material>(findMaterial);
final InkWell inkWell = tester.widget<InkWell>(findInkWell); final InkWell inkWell = tester.widget<InkWell>(findInkWell);
expect(material.textStyle!.color, onPrimaryColor); expect(material.textStyle!.color, foregroundColor);
expect(material.textStyle!.fontSize, 12); expect(material.textStyle!.fontSize, 12);
expect(material.color, primaryColor); expect(material.color, backgroundColor);
expect(material.shadowColor, shadowColor); expect(material.shadowColor, shadowColor);
expect(material.elevation, elevation); expect(material.elevation, elevation);
expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, enabled), enabledMouseCursor); expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, disabled), disabledMouseCursor); expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, disabled), disabledMouseCursor);
expect(inkWell.overlayColor!.resolve(hovered), onPrimaryColor.withOpacity(0.08)); expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.08));
expect(inkWell.overlayColor!.resolve(focused), onPrimaryColor.withOpacity(0.24)); expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.24));
expect(inkWell.overlayColor!.resolve(pressed), onPrimaryColor.withOpacity(0.24)); expect(inkWell.overlayColor!.resolve(pressed), foregroundColor.withOpacity(0.24));
expect(inkWell.enableFeedback, enableFeedback); expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null); expect(material.borderRadius, null);
expect(material.shape, shape); expect(material.shape, shape);
......
...@@ -1568,7 +1568,7 @@ void main() { ...@@ -1568,7 +1568,7 @@ void main() {
expect(tester.getRect(find.byKey(labelKey)), const Rect.fromLTRB(104.0, 0.0, 154.0, 100.0)); expect(tester.getRect(find.byKey(labelKey)), const Rect.fromLTRB(104.0, 0.0, 154.0, 100.0));
}); });
testWidgets('TextButton maximumSize', (WidgetTester tester) async { testWidgets('OutlinedButton maximumSize', (WidgetTester tester) async {
final Key key0 = UniqueKey(); final Key key0 = UniqueKey();
final Key key1 = UniqueKey(); final Key key1 = UniqueKey();
...@@ -1582,7 +1582,7 @@ void main() { ...@@ -1582,7 +1582,7 @@ void main() {
children: <Widget>[ children: <Widget>[
OutlinedButton( OutlinedButton(
key: key0, key: key0,
style: TextButton.styleFrom( style: OutlinedButton.styleFrom(
minimumSize: const Size(24, 36), minimumSize: const Size(24, 36),
maximumSize: const Size.fromWidth(64), maximumSize: const Size.fromWidth(64),
), ),
...@@ -1591,7 +1591,7 @@ void main() { ...@@ -1591,7 +1591,7 @@ void main() {
), ),
OutlinedButton.icon( OutlinedButton.icon(
key: key1, key: key1,
style: TextButton.styleFrom( style: OutlinedButton.styleFrom(
minimumSize: const Size(24, 36), minimumSize: const Size(24, 36),
maximumSize: const Size.fromWidth(104), maximumSize: const Size.fromWidth(104),
), ),
......
...@@ -49,9 +49,9 @@ void main() { ...@@ -49,9 +49,9 @@ void main() {
}); });
group('[Theme, TextTheme, OutlinedButton style overrides]', () { group('[Theme, TextTheme, OutlinedButton style overrides]', () {
const Color primaryColor = Color(0xff000001); const Color foregroundColor = Color(0xff000001);
const Color onSurfaceColor = Color(0xff000002); const Color backgroundColor = Color(0xff000002);
const Color backgroundColor = Color(0xff000003); const Color disabledColor = Color(0xff000003);
const Color shadowColor = Color(0xff000004); const Color shadowColor = Color(0xff000004);
const double elevation = 3; const double elevation = 3;
const TextStyle textStyle = TextStyle(fontSize: 12.0); const TextStyle textStyle = TextStyle(fontSize: 12.0);
...@@ -67,9 +67,10 @@ void main() { ...@@ -67,9 +67,10 @@ void main() {
const AlignmentGeometry alignment = Alignment.centerLeft; const AlignmentGeometry alignment = Alignment.centerLeft;
final ButtonStyle style = OutlinedButton.styleFrom( final ButtonStyle style = OutlinedButton.styleFrom(
primary: primaryColor, foregroundColor: foregroundColor,
onSurface: onSurfaceColor, disabledForegroundColor: disabledColor,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
disabledBackgroundColor: disabledColor,
shadowColor: shadowColor, shadowColor: shadowColor,
elevation: elevation, elevation: elevation,
textStyle: textStyle, textStyle: textStyle,
...@@ -130,15 +131,15 @@ void main() { ...@@ -130,15 +131,15 @@ void main() {
void checkButton(WidgetTester tester) { void checkButton(WidgetTester tester) {
final Material material = tester.widget<Material>(findMaterial); final Material material = tester.widget<Material>(findMaterial);
final InkWell inkWell = tester.widget<InkWell>(findInkWell); final InkWell inkWell = tester.widget<InkWell>(findInkWell);
expect(material.textStyle!.color, primaryColor); expect(material.textStyle!.color, foregroundColor);
expect(material.textStyle!.fontSize, 12); expect(material.textStyle!.fontSize, 12);
expect(material.color, backgroundColor); expect(material.color, backgroundColor);
expect(material.shadowColor, shadowColor); expect(material.shadowColor, shadowColor);
expect(material.elevation, elevation); expect(material.elevation, elevation);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, enabled), enabledMouseCursor); expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, disabled), disabledMouseCursor); expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, disabled), disabledMouseCursor);
expect(inkWell.overlayColor!.resolve(hovered), primaryColor.withOpacity(0.04)); expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.04));
expect(inkWell.overlayColor!.resolve(focused), primaryColor.withOpacity(0.12)); expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.12));
expect(inkWell.enableFeedback, enableFeedback); expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null); expect(material.borderRadius, null);
expect(material.shape, shape); expect(material.shape, shape);
......
...@@ -499,9 +499,9 @@ void main() { ...@@ -499,9 +499,9 @@ void main() {
dividerTheme: const DividerThemeData(color: Colors.black), dividerTheme: const DividerThemeData(color: Colors.black),
bottomNavigationBarTheme: const BottomNavigationBarThemeData(type: BottomNavigationBarType.fixed), bottomNavigationBarTheme: const BottomNavigationBarThemeData(type: BottomNavigationBarType.fixed),
timePickerTheme: const TimePickerThemeData(backgroundColor: Colors.black), timePickerTheme: const TimePickerThemeData(backgroundColor: Colors.black),
textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(primary: Colors.red)), textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(foregroundColor: Colors.red)),
elevatedButtonTheme: ElevatedButtonThemeData(style: ElevatedButton.styleFrom(primary: Colors.green)), elevatedButtonTheme: ElevatedButtonThemeData(style: ElevatedButton.styleFrom(backgroundColor: Colors.green)),
outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(primary: Colors.blue)), outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(foregroundColor: Colors.blue)),
textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.black), textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.black),
dataTableTheme: const DataTableThemeData(), dataTableTheme: const DataTableThemeData(),
checkboxTheme: const CheckboxThemeData(), checkboxTheme: const CheckboxThemeData(),
......
...@@ -44,9 +44,9 @@ void main() { ...@@ -44,9 +44,9 @@ void main() {
}); });
group('[Theme, TextTheme, TextButton style overrides]', () { group('[Theme, TextTheme, TextButton style overrides]', () {
const Color primaryColor = Color(0xff000001); const Color foregroundColor = Color(0xff000001);
const Color onSurfaceColor = Color(0xff000002); const Color backgroundColor = Color(0xff000002);
const Color backgroundColor = Color(0xff000003); const Color disabledColor = Color(0xff000003);
const Color shadowColor = Color(0xff000004); const Color shadowColor = Color(0xff000004);
const double elevation = 3; const double elevation = 3;
const TextStyle textStyle = TextStyle(fontSize: 12.0); const TextStyle textStyle = TextStyle(fontSize: 12.0);
...@@ -62,9 +62,10 @@ void main() { ...@@ -62,9 +62,10 @@ void main() {
const AlignmentGeometry alignment = Alignment.centerLeft; const AlignmentGeometry alignment = Alignment.centerLeft;
final ButtonStyle style = TextButton.styleFrom( final ButtonStyle style = TextButton.styleFrom(
primary: primaryColor, foregroundColor: foregroundColor,
onSurface: onSurfaceColor, disabledForegroundColor: disabledColor,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
disabledBackgroundColor: disabledColor,
shadowColor: shadowColor, shadowColor: shadowColor,
elevation: elevation, elevation: elevation,
textStyle: textStyle, textStyle: textStyle,
...@@ -125,15 +126,15 @@ void main() { ...@@ -125,15 +126,15 @@ void main() {
void checkButton(WidgetTester tester) { void checkButton(WidgetTester tester) {
final Material material = tester.widget<Material>(findMaterial); final Material material = tester.widget<Material>(findMaterial);
final InkWell inkWell = tester.widget<InkWell>(findInkWell); final InkWell inkWell = tester.widget<InkWell>(findInkWell);
expect(material.textStyle!.color, primaryColor); expect(material.textStyle!.color, foregroundColor);
expect(material.textStyle!.fontSize, 12); expect(material.textStyle!.fontSize, 12);
expect(material.color, backgroundColor); expect(material.color, backgroundColor);
expect(material.shadowColor, shadowColor); expect(material.shadowColor, shadowColor);
expect(material.elevation, elevation); expect(material.elevation, elevation);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, enabled), enabledMouseCursor); expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, disabled), disabledMouseCursor); expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, disabled), disabledMouseCursor);
expect(inkWell.overlayColor!.resolve(hovered), primaryColor.withOpacity(0.04)); expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.04));
expect(inkWell.overlayColor!.resolve(focused), primaryColor.withOpacity(0.12)); expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.12));
expect(inkWell.enableFeedback, enableFeedback); expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null); expect(material.borderRadius, null);
expect(material.shape, shape); expect(material.shape, shape);
......
...@@ -695,13 +695,13 @@ void main() { ...@@ -695,13 +695,13 @@ void main() {
dialogTheme: const DialogTheme(backgroundColor: Colors.black), dialogTheme: const DialogTheme(backgroundColor: Colors.black),
dividerTheme: const DividerThemeData(color: Colors.black), dividerTheme: const DividerThemeData(color: Colors.black),
drawerTheme: const DrawerThemeData(), drawerTheme: const DrawerThemeData(),
elevatedButtonTheme: ElevatedButtonThemeData(style: ElevatedButton.styleFrom(primary: Colors.green)), elevatedButtonTheme: ElevatedButtonThemeData(style: ElevatedButton.styleFrom(backgroundColor: Colors.green)),
expansionTileTheme: const ExpansionTileThemeData(backgroundColor: Colors.black), expansionTileTheme: const ExpansionTileThemeData(backgroundColor: Colors.black),
floatingActionButtonTheme: const FloatingActionButtonThemeData(backgroundColor: Colors.black), floatingActionButtonTheme: const FloatingActionButtonThemeData(backgroundColor: Colors.black),
listTileTheme: const ListTileThemeData(), listTileTheme: const ListTileThemeData(),
navigationBarTheme: const NavigationBarThemeData(backgroundColor: Colors.black), navigationBarTheme: const NavigationBarThemeData(backgroundColor: Colors.black),
navigationRailTheme: const NavigationRailThemeData(backgroundColor: Colors.black), navigationRailTheme: const NavigationRailThemeData(backgroundColor: Colors.black),
outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(primary: Colors.blue)), outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(foregroundColor: Colors.blue)),
popupMenuTheme: const PopupMenuThemeData(color: Colors.black), popupMenuTheme: const PopupMenuThemeData(color: Colors.black),
progressIndicatorTheme: const ProgressIndicatorThemeData(), progressIndicatorTheme: const ProgressIndicatorThemeData(),
radioTheme: const RadioThemeData(), radioTheme: const RadioThemeData(),
...@@ -709,7 +709,7 @@ void main() { ...@@ -709,7 +709,7 @@ void main() {
snackBarTheme: const SnackBarThemeData(backgroundColor: Colors.black), snackBarTheme: const SnackBarThemeData(backgroundColor: Colors.black),
switchTheme: const SwitchThemeData(), switchTheme: const SwitchThemeData(),
tabBarTheme: const TabBarTheme(labelColor: Colors.black), tabBarTheme: const TabBarTheme(labelColor: Colors.black),
textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(primary: Colors.red)), textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(foregroundColor: Colors.red)),
textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.black), textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.black),
timePickerTheme: const TimePickerThemeData(backgroundColor: Colors.black), timePickerTheme: const TimePickerThemeData(backgroundColor: Colors.black),
toggleButtonsTheme: const ToggleButtonsThemeData(textStyle: TextStyle(color: Colors.black)), toggleButtonsTheme: const ToggleButtonsThemeData(textStyle: TextStyle(color: Colors.black)),
......
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