mirror of
https://github.com/flutter/flutter
synced 2024-08-24 18:36:03 +00:00
Remove bottomAppBarColor
from ThemeData
(#144080)
This PR is to remove deprecated ThemeData.bottomAppBarColor. These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162. Part of https://github.com/flutter/flutter/pull/111080
This commit is contained in:
parent
d0fb2929df
commit
e707f0de69
|
@ -94,8 +94,10 @@ class BottomAppBar extends StatefulWidget {
|
||||||
/// The bottom app bar's background color.
|
/// The bottom app bar's background color.
|
||||||
///
|
///
|
||||||
/// If this property is null then [BottomAppBarTheme.color] of
|
/// If this property is null then [BottomAppBarTheme.color] of
|
||||||
/// [ThemeData.bottomAppBarTheme] is used. If that's null then
|
/// [ThemeData.bottomAppBarTheme] is used. If that's null and [ThemeData.useMaterial3]
|
||||||
/// [ThemeData.bottomAppBarColor] is used.
|
/// is true, the default value is [ColorScheme.surface]; if [ThemeData.useMaterial3]
|
||||||
|
/// is false, then the default value is `Color(0xFF424242)` in dark theme and
|
||||||
|
/// [Colors.white] in light theme.
|
||||||
final Color? color;
|
final Color? color;
|
||||||
|
|
||||||
/// The z-coordinate at which to place this bottom app bar relative to its
|
/// The z-coordinate at which to place this bottom app bar relative to its
|
||||||
|
@ -280,7 +282,7 @@ class _BottomAppBarDefaultsM2 extends BottomAppBarTheme {
|
||||||
final BuildContext context;
|
final BuildContext context;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color? get color => Theme.of(context).bottomAppBarColor;
|
Color? get color => Theme.of(context).brightness == Brightness.dark ? Colors.grey[800]! : Colors.white;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color? get surfaceTintColor => Theme.of(context).colorScheme.surfaceTint;
|
Color? get surfaceTintColor => Theme.of(context).colorScheme.surfaceTint;
|
||||||
|
|
|
@ -39,8 +39,6 @@ class BottomAppBarTheme with Diagnosticable {
|
||||||
});
|
});
|
||||||
|
|
||||||
/// Overrides the default value for [BottomAppBar.color].
|
/// Overrides the default value for [BottomAppBar.color].
|
||||||
///
|
|
||||||
/// If null, [BottomAppBar] uses [ThemeData.bottomAppBarColor].
|
|
||||||
final Color? color;
|
final Color? color;
|
||||||
|
|
||||||
/// Overrides the default value for [BottomAppBar.elevation].
|
/// Overrides the default value for [BottomAppBar.elevation].
|
||||||
|
|
|
@ -384,11 +384,6 @@ class ThemeData with Diagnosticable {
|
||||||
'This feature was deprecated after v3.3.0-0.5.pre.',
|
'This feature was deprecated after v3.3.0-0.5.pre.',
|
||||||
)
|
)
|
||||||
Color? backgroundColor,
|
Color? backgroundColor,
|
||||||
@Deprecated(
|
|
||||||
'Use BottomAppBarTheme.color instead. '
|
|
||||||
'This feature was deprecated after v3.3.0-0.6.pre.',
|
|
||||||
)
|
|
||||||
Color? bottomAppBarColor,
|
|
||||||
}) {
|
}) {
|
||||||
// GENERAL CONFIGURATION
|
// GENERAL CONFIGURATION
|
||||||
cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault();
|
cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault();
|
||||||
|
@ -441,7 +436,6 @@ class ThemeData with Diagnosticable {
|
||||||
primaryColor ??= primarySurfaceColor;
|
primaryColor ??= primarySurfaceColor;
|
||||||
canvasColor ??= colorScheme.background;
|
canvasColor ??= colorScheme.background;
|
||||||
scaffoldBackgroundColor ??= colorScheme.background;
|
scaffoldBackgroundColor ??= colorScheme.background;
|
||||||
bottomAppBarColor ??= colorScheme.surface;
|
|
||||||
cardColor ??= colorScheme.surface;
|
cardColor ??= colorScheme.surface;
|
||||||
dividerColor ??= colorScheme.outline;
|
dividerColor ??= colorScheme.outline;
|
||||||
backgroundColor ??= colorScheme.background;
|
backgroundColor ??= colorScheme.background;
|
||||||
|
@ -569,7 +563,6 @@ class ThemeData with Diagnosticable {
|
||||||
// DEPRECATED (newest deprecations at the bottom)
|
// DEPRECATED (newest deprecations at the bottom)
|
||||||
errorColor ??= Colors.red[700]!;
|
errorColor ??= Colors.red[700]!;
|
||||||
backgroundColor ??= isDark ? Colors.grey[700]! : primarySwatch[200]!;
|
backgroundColor ??= isDark ? Colors.grey[700]! : primarySwatch[200]!;
|
||||||
bottomAppBarColor ??= colorSchemeSeed != null ? colorScheme.surface : isDark ? Colors.grey[800]! : Colors.white;
|
|
||||||
|
|
||||||
return ThemeData.raw(
|
return ThemeData.raw(
|
||||||
// For the sanity of the reader, make sure these properties are in the same
|
// For the sanity of the reader, make sure these properties are in the same
|
||||||
|
@ -667,7 +660,6 @@ class ThemeData with Diagnosticable {
|
||||||
toggleableActiveColor: toggleableActiveColor,
|
toggleableActiveColor: toggleableActiveColor,
|
||||||
errorColor: errorColor,
|
errorColor: errorColor,
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
bottomAppBarColor: bottomAppBarColor,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -791,18 +783,12 @@ class ThemeData with Diagnosticable {
|
||||||
'This feature was deprecated after v3.3.0-0.5.pre.',
|
'This feature was deprecated after v3.3.0-0.5.pre.',
|
||||||
)
|
)
|
||||||
Color? backgroundColor,
|
Color? backgroundColor,
|
||||||
@Deprecated(
|
|
||||||
'Use BottomAppBarTheme.color instead. '
|
|
||||||
'This feature was deprecated after v3.3.0-0.6.pre.',
|
|
||||||
)
|
|
||||||
Color? bottomAppBarColor,
|
|
||||||
|
|
||||||
}) : // DEPRECATED (newest deprecations at the bottom)
|
}) : // DEPRECATED (newest deprecations at the bottom)
|
||||||
// should not be `required`, use getter pattern to avoid breakages.
|
// should not be `required`, use getter pattern to avoid breakages.
|
||||||
_toggleableActiveColor = toggleableActiveColor,
|
_toggleableActiveColor = toggleableActiveColor,
|
||||||
_errorColor = errorColor,
|
_errorColor = errorColor,
|
||||||
_backgroundColor = backgroundColor,
|
_backgroundColor = backgroundColor,
|
||||||
_bottomAppBarColor = bottomAppBarColor,
|
|
||||||
assert(toggleableActiveColor != null),
|
assert(toggleableActiveColor != null),
|
||||||
// DEPRECATED (newest deprecations at the bottom)
|
// DEPRECATED (newest deprecations at the bottom)
|
||||||
assert(errorColor != null),
|
assert(errorColor != null),
|
||||||
|
@ -851,7 +837,6 @@ class ThemeData with Diagnosticable {
|
||||||
primaryColor: primarySurfaceColor,
|
primaryColor: primarySurfaceColor,
|
||||||
canvasColor: colorScheme.background,
|
canvasColor: colorScheme.background,
|
||||||
scaffoldBackgroundColor: colorScheme.background,
|
scaffoldBackgroundColor: colorScheme.background,
|
||||||
bottomAppBarColor: colorScheme.surface,
|
|
||||||
cardColor: colorScheme.surface,
|
cardColor: colorScheme.surface,
|
||||||
dividerColor: colorScheme.onSurface.withOpacity(0.12),
|
dividerColor: colorScheme.onSurface.withOpacity(0.12),
|
||||||
backgroundColor: colorScheme.background,
|
backgroundColor: colorScheme.background,
|
||||||
|
@ -1184,14 +1169,6 @@ class ThemeData with Diagnosticable {
|
||||||
|
|
||||||
// COLOR
|
// COLOR
|
||||||
|
|
||||||
/// The default color of the [BottomAppBar].
|
|
||||||
@Deprecated(
|
|
||||||
'Use BottomAppBarTheme.color instead. '
|
|
||||||
'This feature was deprecated after v3.3.0-0.6.pre.',
|
|
||||||
)
|
|
||||||
Color get bottomAppBarColor => _bottomAppBarColor!;
|
|
||||||
final Color? _bottomAppBarColor;
|
|
||||||
|
|
||||||
/// The default color of [MaterialType.canvas] [Material].
|
/// The default color of [MaterialType.canvas] [Material].
|
||||||
final Color canvasColor;
|
final Color canvasColor;
|
||||||
|
|
||||||
|
@ -1619,11 +1596,6 @@ class ThemeData with Diagnosticable {
|
||||||
'This feature was deprecated after v3.3.0-0.5.pre.',
|
'This feature was deprecated after v3.3.0-0.5.pre.',
|
||||||
)
|
)
|
||||||
Color? backgroundColor,
|
Color? backgroundColor,
|
||||||
@Deprecated(
|
|
||||||
'Use BottomAppBarTheme.color instead. '
|
|
||||||
'This feature was deprecated after v3.3.0-0.6.pre.',
|
|
||||||
)
|
|
||||||
Color? bottomAppBarColor,
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
'Use a ThemeData constructor (.from, .light, or .dark) instead. '
|
'Use a ThemeData constructor (.from, .light, or .dark) instead. '
|
||||||
'These constructors all have a useMaterial3 argument, '
|
'These constructors all have a useMaterial3 argument, '
|
||||||
|
@ -1732,7 +1704,6 @@ class ThemeData with Diagnosticable {
|
||||||
toggleableActiveColor: toggleableActiveColor ?? _toggleableActiveColor,
|
toggleableActiveColor: toggleableActiveColor ?? _toggleableActiveColor,
|
||||||
errorColor: errorColor ?? _errorColor,
|
errorColor: errorColor ?? _errorColor,
|
||||||
backgroundColor: backgroundColor ?? _backgroundColor,
|
backgroundColor: backgroundColor ?? _backgroundColor,
|
||||||
bottomAppBarColor: bottomAppBarColor ?? _bottomAppBarColor,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1930,7 +1901,6 @@ class ThemeData with Diagnosticable {
|
||||||
toggleableActiveColor: Color.lerp(a.toggleableActiveColor, b.toggleableActiveColor, t),
|
toggleableActiveColor: Color.lerp(a.toggleableActiveColor, b.toggleableActiveColor, t),
|
||||||
errorColor: Color.lerp(a.errorColor, b.errorColor, t),
|
errorColor: Color.lerp(a.errorColor, b.errorColor, t),
|
||||||
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
|
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
|
||||||
bottomAppBarColor: Color.lerp(a.bottomAppBarColor, b.bottomAppBarColor, t),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2034,8 +2004,7 @@ class ThemeData with Diagnosticable {
|
||||||
// DEPRECATED (newest deprecations at the bottom)
|
// DEPRECATED (newest deprecations at the bottom)
|
||||||
other.toggleableActiveColor == toggleableActiveColor &&
|
other.toggleableActiveColor == toggleableActiveColor &&
|
||||||
other.errorColor == errorColor &&
|
other.errorColor == errorColor &&
|
||||||
other.backgroundColor == backgroundColor &&
|
other.backgroundColor == backgroundColor;
|
||||||
other.bottomAppBarColor == bottomAppBarColor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -2138,7 +2107,6 @@ class ThemeData with Diagnosticable {
|
||||||
toggleableActiveColor,
|
toggleableActiveColor,
|
||||||
errorColor,
|
errorColor,
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
bottomAppBarColor,
|
|
||||||
];
|
];
|
||||||
return Object.hashAll(values);
|
return Object.hashAll(values);
|
||||||
}
|
}
|
||||||
|
@ -2242,7 +2210,6 @@ class ThemeData with Diagnosticable {
|
||||||
properties.add(ColorProperty('toggleableActiveColor', toggleableActiveColor, defaultValue: defaultData.toggleableActiveColor, level: DiagnosticLevel.debug));
|
properties.add(ColorProperty('toggleableActiveColor', toggleableActiveColor, defaultValue: defaultData.toggleableActiveColor, level: DiagnosticLevel.debug));
|
||||||
properties.add(ColorProperty('errorColor', errorColor, defaultValue: defaultData.errorColor, level: DiagnosticLevel.debug));
|
properties.add(ColorProperty('errorColor', errorColor, defaultValue: defaultData.errorColor, level: DiagnosticLevel.debug));
|
||||||
properties.add(ColorProperty('backgroundColor', backgroundColor, defaultValue: defaultData.backgroundColor, level: DiagnosticLevel.debug));
|
properties.add(ColorProperty('backgroundColor', backgroundColor, defaultValue: defaultData.backgroundColor, level: DiagnosticLevel.debug));
|
||||||
properties.add(ColorProperty('bottomAppBarColor', bottomAppBarColor, defaultValue: defaultData.bottomAppBarColor, level: DiagnosticLevel.debug));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ void main() {
|
||||||
home: Builder(
|
home: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Theme(
|
return Theme(
|
||||||
data: Theme.of(context).copyWith(bottomAppBarColor: const Color(0xffffff00)),
|
data: Theme.of(context).copyWith(bottomAppBarTheme: const BottomAppBarTheme(color: Color(0xffffff00))),
|
||||||
child: const Scaffold(
|
child: const Scaffold(
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: null,
|
onPressed: null,
|
||||||
|
@ -259,7 +259,7 @@ void main() {
|
||||||
home: Builder(
|
home: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Theme(
|
return Theme(
|
||||||
data: Theme.of(context).copyWith(bottomAppBarColor: const Color(0xffffff00)),
|
data: Theme.of(context).copyWith(bottomAppBarTheme: const BottomAppBarTheme(color: Color(0xffffff00))),
|
||||||
child: const Scaffold(
|
child: const Scaffold(
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: null,
|
onPressed: null,
|
||||||
|
@ -287,7 +287,7 @@ void main() {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData.light(useMaterial3: true).copyWith(
|
theme: ThemeData.light(useMaterial3: true).copyWith(
|
||||||
bottomAppBarColor: const Color(0xffffff00),
|
bottomAppBarTheme: const BottomAppBarTheme(color: Color(0xffffff00)),
|
||||||
),
|
),
|
||||||
home: Builder(
|
home: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
|
|
@ -29,7 +29,6 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Material2 - BAB color - Widget', (WidgetTester tester) async {
|
testWidgets('Material2 - BAB color - Widget', (WidgetTester tester) async {
|
||||||
const Color themeColor = Colors.white10;
|
|
||||||
const Color babThemeColor = Colors.black87;
|
const Color babThemeColor = Colors.black87;
|
||||||
const Color babColor = Colors.pink;
|
const Color babColor = Colors.pink;
|
||||||
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
||||||
|
@ -38,7 +37,6 @@ void main() {
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
useMaterial3: false,
|
useMaterial3: false,
|
||||||
bottomAppBarTheme: theme,
|
bottomAppBarTheme: theme,
|
||||||
bottomAppBarColor: themeColor
|
|
||||||
),
|
),
|
||||||
home: const Scaffold(body: BottomAppBar(color: babColor)),
|
home: const Scaffold(body: BottomAppBar(color: babColor)),
|
||||||
));
|
));
|
||||||
|
@ -48,7 +46,6 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Material2 - BAB color - BabTheme', (WidgetTester tester) async {
|
testWidgets('Material2 - BAB color - BabTheme', (WidgetTester tester) async {
|
||||||
const Color themeColor = Colors.white10;
|
|
||||||
const Color babThemeColor = Colors.black87;
|
const Color babThemeColor = Colors.black87;
|
||||||
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
||||||
|
|
||||||
|
@ -56,7 +53,6 @@ void main() {
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
useMaterial3: false,
|
useMaterial3: false,
|
||||||
bottomAppBarTheme: theme,
|
bottomAppBarTheme: theme,
|
||||||
bottomAppBarColor: themeColor
|
|
||||||
),
|
),
|
||||||
home: const Scaffold(body: BottomAppBar()),
|
home: const Scaffold(body: BottomAppBar()),
|
||||||
));
|
));
|
||||||
|
@ -69,7 +65,7 @@ void main() {
|
||||||
const Color themeColor = Colors.white10;
|
const Color themeColor = Colors.white10;
|
||||||
|
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
theme: ThemeData(useMaterial3: false, bottomAppBarColor: themeColor),
|
theme: ThemeData(useMaterial3: false, bottomAppBarTheme: const BottomAppBarTheme(color: themeColor)),
|
||||||
home: const Scaffold(body: BottomAppBar()),
|
home: const Scaffold(body: BottomAppBar()),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -130,7 +126,6 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Material3 - BAB color - Widget', (WidgetTester tester) async {
|
testWidgets('Material3 - BAB color - Widget', (WidgetTester tester) async {
|
||||||
const Color themeColor = Colors.white10;
|
|
||||||
const Color babThemeColor = Colors.black87;
|
const Color babThemeColor = Colors.black87;
|
||||||
const Color babColor = Colors.pink;
|
const Color babColor = Colors.pink;
|
||||||
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
||||||
|
@ -139,7 +134,6 @@ void main() {
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
bottomAppBarTheme: theme,
|
bottomAppBarTheme: theme,
|
||||||
bottomAppBarColor: themeColor
|
|
||||||
),
|
),
|
||||||
home: const Scaffold(body: BottomAppBar(color: babColor, surfaceTintColor: Colors.transparent)),
|
home: const Scaffold(body: BottomAppBar(color: babColor, surfaceTintColor: Colors.transparent)),
|
||||||
));
|
));
|
||||||
|
@ -149,7 +143,6 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Material3 - BAB color - BabTheme', (WidgetTester tester) async {
|
testWidgets('Material3 - BAB color - BabTheme', (WidgetTester tester) async {
|
||||||
const Color themeColor = Colors.white10;
|
|
||||||
const Color babThemeColor = Colors.black87;
|
const Color babThemeColor = Colors.black87;
|
||||||
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
const BottomAppBarTheme theme = BottomAppBarTheme(color: babThemeColor);
|
||||||
|
|
||||||
|
@ -157,7 +150,6 @@ void main() {
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
bottomAppBarTheme: theme,
|
bottomAppBarTheme: theme,
|
||||||
bottomAppBarColor: themeColor
|
|
||||||
),
|
),
|
||||||
home: const Scaffold(body: BottomAppBar(surfaceTintColor: Colors.transparent)),
|
home: const Scaffold(body: BottomAppBar(surfaceTintColor: Colors.transparent)),
|
||||||
));
|
));
|
||||||
|
@ -204,7 +196,6 @@ void main() {
|
||||||
|
|
||||||
testWidgets('Material3 - BAB surfaceTintColor - Widget', (WidgetTester tester) async {
|
testWidgets('Material3 - BAB surfaceTintColor - Widget', (WidgetTester tester) async {
|
||||||
const Color color = Colors.white10; // base color that the surface tint will be applied to
|
const Color color = Colors.white10; // base color that the surface tint will be applied to
|
||||||
const Color themeSurfaceTintColor = Colors.white10;
|
|
||||||
const Color babThemeSurfaceTintColor = Colors.black87;
|
const Color babThemeSurfaceTintColor = Colors.black87;
|
||||||
const Color babSurfaceTintColor = Colors.pink;
|
const Color babSurfaceTintColor = Colors.pink;
|
||||||
const BottomAppBarTheme theme = BottomAppBarTheme(
|
const BottomAppBarTheme theme = BottomAppBarTheme(
|
||||||
|
@ -214,7 +205,6 @@ void main() {
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
bottomAppBarTheme: theme,
|
bottomAppBarTheme: theme,
|
||||||
bottomAppBarColor: themeSurfaceTintColor
|
|
||||||
),
|
),
|
||||||
home: const Scaffold(
|
home: const Scaffold(
|
||||||
body: BottomAppBar(color: color, surfaceTintColor: babSurfaceTintColor)
|
body: BottomAppBar(color: color, surfaceTintColor: babSurfaceTintColor)
|
||||||
|
@ -227,7 +217,6 @@ void main() {
|
||||||
|
|
||||||
testWidgets('Material3 - BAB surfaceTintColor - BabTheme', (WidgetTester tester) async {
|
testWidgets('Material3 - BAB surfaceTintColor - BabTheme', (WidgetTester tester) async {
|
||||||
const Color color = Colors.blue; // base color that the surface tint will be applied to
|
const Color color = Colors.blue; // base color that the surface tint will be applied to
|
||||||
const Color themeColor = Colors.white10;
|
|
||||||
const Color babThemeColor = Colors.black87;
|
const Color babThemeColor = Colors.black87;
|
||||||
const BottomAppBarTheme theme = BottomAppBarTheme(
|
const BottomAppBarTheme theme = BottomAppBarTheme(
|
||||||
surfaceTintColor: babThemeColor
|
surfaceTintColor: babThemeColor
|
||||||
|
@ -237,7 +226,6 @@ void main() {
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
bottomAppBarTheme: theme,
|
bottomAppBarTheme: theme,
|
||||||
bottomAppBarColor: themeColor
|
|
||||||
),
|
),
|
||||||
home: const Scaffold(body: BottomAppBar(color: color)),
|
home: const Scaffold(body: BottomAppBar(color: color)),
|
||||||
));
|
));
|
||||||
|
|
|
@ -625,7 +625,6 @@ void main() {
|
||||||
canvasColor: Colors.black,
|
canvasColor: Colors.black,
|
||||||
shadowColor: Colors.black,
|
shadowColor: Colors.black,
|
||||||
scaffoldBackgroundColor: Colors.black,
|
scaffoldBackgroundColor: Colors.black,
|
||||||
bottomAppBarColor: Colors.black,
|
|
||||||
cardColor: Colors.black,
|
cardColor: Colors.black,
|
||||||
dividerColor: Colors.black,
|
dividerColor: Colors.black,
|
||||||
focusColor: Colors.black,
|
focusColor: Colors.black,
|
||||||
|
|
|
@ -171,7 +171,6 @@ void main() {
|
||||||
expect(theme.primaryColor, theme.colorScheme.primary);
|
expect(theme.primaryColor, theme.colorScheme.primary);
|
||||||
expect(theme.canvasColor, theme.colorScheme.background);
|
expect(theme.canvasColor, theme.colorScheme.background);
|
||||||
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
||||||
expect(theme.bottomAppBarColor, theme.colorScheme.surface);
|
|
||||||
expect(theme.cardColor, theme.colorScheme.surface);
|
expect(theme.cardColor, theme.colorScheme.surface);
|
||||||
expect(theme.dividerColor, theme.colorScheme.outline);
|
expect(theme.dividerColor, theme.colorScheme.outline);
|
||||||
expect(theme.backgroundColor, theme.colorScheme.background);
|
expect(theme.backgroundColor, theme.colorScheme.background);
|
||||||
|
@ -220,7 +219,6 @@ void main() {
|
||||||
expect(theme.primaryColor, theme.colorScheme.surface);
|
expect(theme.primaryColor, theme.colorScheme.surface);
|
||||||
expect(theme.canvasColor, theme.colorScheme.background);
|
expect(theme.canvasColor, theme.colorScheme.background);
|
||||||
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
||||||
expect(theme.bottomAppBarColor, theme.colorScheme.surface);
|
|
||||||
expect(theme.cardColor, theme.colorScheme.surface);
|
expect(theme.cardColor, theme.colorScheme.surface);
|
||||||
expect(theme.dividerColor, theme.colorScheme.outline);
|
expect(theme.dividerColor, theme.colorScheme.outline);
|
||||||
expect(theme.backgroundColor, theme.colorScheme.background);
|
expect(theme.backgroundColor, theme.colorScheme.background);
|
||||||
|
@ -266,7 +264,6 @@ void main() {
|
||||||
expect(theme.primaryColor, theme.colorScheme.primary);
|
expect(theme.primaryColor, theme.colorScheme.primary);
|
||||||
expect(theme.canvasColor, theme.colorScheme.background);
|
expect(theme.canvasColor, theme.colorScheme.background);
|
||||||
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
||||||
expect(theme.bottomAppBarColor, theme.colorScheme.surface);
|
|
||||||
expect(theme.cardColor, theme.colorScheme.surface);
|
expect(theme.cardColor, theme.colorScheme.surface);
|
||||||
expect(theme.dividerColor, theme.colorScheme.outline);
|
expect(theme.dividerColor, theme.colorScheme.outline);
|
||||||
expect(theme.backgroundColor, theme.colorScheme.background);
|
expect(theme.backgroundColor, theme.colorScheme.background);
|
||||||
|
@ -313,7 +310,6 @@ void main() {
|
||||||
expect(theme.primaryColor, theme.colorScheme.primary);
|
expect(theme.primaryColor, theme.colorScheme.primary);
|
||||||
expect(theme.canvasColor, theme.colorScheme.background);
|
expect(theme.canvasColor, theme.colorScheme.background);
|
||||||
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
||||||
expect(theme.bottomAppBarColor, theme.colorScheme.surface);
|
|
||||||
expect(theme.cardColor, theme.colorScheme.surface);
|
expect(theme.cardColor, theme.colorScheme.surface);
|
||||||
expect(theme.dividerColor, theme.colorScheme.outline);
|
expect(theme.dividerColor, theme.colorScheme.outline);
|
||||||
expect(theme.backgroundColor, theme.colorScheme.background);
|
expect(theme.backgroundColor, theme.colorScheme.background);
|
||||||
|
@ -360,7 +356,6 @@ void main() {
|
||||||
expect(theme.primaryColor, theme.colorScheme.surface);
|
expect(theme.primaryColor, theme.colorScheme.surface);
|
||||||
expect(theme.canvasColor, theme.colorScheme.background);
|
expect(theme.canvasColor, theme.colorScheme.background);
|
||||||
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
expect(theme.scaffoldBackgroundColor, theme.colorScheme.background);
|
||||||
expect(theme.bottomAppBarColor, theme.colorScheme.surface);
|
|
||||||
expect(theme.cardColor, theme.colorScheme.surface);
|
expect(theme.cardColor, theme.colorScheme.surface);
|
||||||
expect(theme.dividerColor, theme.colorScheme.outline);
|
expect(theme.dividerColor, theme.colorScheme.outline);
|
||||||
expect(theme.backgroundColor, theme.colorScheme.background);
|
expect(theme.backgroundColor, theme.colorScheme.background);
|
||||||
|
@ -812,7 +807,6 @@ void main() {
|
||||||
toggleableActiveColor: Colors.black,
|
toggleableActiveColor: Colors.black,
|
||||||
errorColor: Colors.black,
|
errorColor: Colors.black,
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
bottomAppBarColor: Colors.black,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final SliderThemeData otherSliderTheme = SliderThemeData.fromPrimaryColors(
|
final SliderThemeData otherSliderTheme = SliderThemeData.fromPrimaryColors(
|
||||||
|
@ -932,7 +926,6 @@ void main() {
|
||||||
toggleableActiveColor: Colors.white,
|
toggleableActiveColor: Colors.white,
|
||||||
errorColor: Colors.white,
|
errorColor: Colors.white,
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
bottomAppBarColor: Colors.white,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final ThemeData themeDataCopy = theme.copyWith(
|
final ThemeData themeDataCopy = theme.copyWith(
|
||||||
|
@ -1033,7 +1026,6 @@ void main() {
|
||||||
toggleableActiveColor: otherTheme.toggleableActiveColor,
|
toggleableActiveColor: otherTheme.toggleableActiveColor,
|
||||||
errorColor: otherTheme.errorColor,
|
errorColor: otherTheme.errorColor,
|
||||||
backgroundColor: otherTheme.backgroundColor,
|
backgroundColor: otherTheme.backgroundColor,
|
||||||
bottomAppBarColor: otherTheme.bottomAppBarColor,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// For the sanity of the reader, make sure these properties are in the same
|
// For the sanity of the reader, make sure these properties are in the same
|
||||||
|
@ -1135,7 +1127,6 @@ void main() {
|
||||||
expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.toggleableActiveColor));
|
expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.toggleableActiveColor));
|
||||||
expect(themeDataCopy.errorColor, equals(otherTheme.errorColor));
|
expect(themeDataCopy.errorColor, equals(otherTheme.errorColor));
|
||||||
expect(themeDataCopy.backgroundColor, equals(otherTheme.backgroundColor));
|
expect(themeDataCopy.backgroundColor, equals(otherTheme.backgroundColor));
|
||||||
expect(themeDataCopy.bottomAppBarColor, equals(otherTheme.bottomAppBarColor));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('ThemeData.toString has less than 200 characters output', (WidgetTester tester) async {
|
testWidgets('ThemeData.toString has less than 200 characters output', (WidgetTester tester) async {
|
||||||
|
@ -1268,7 +1259,6 @@ void main() {
|
||||||
'toggleableActiveColor',
|
'toggleableActiveColor',
|
||||||
'errorColor',
|
'errorColor',
|
||||||
'backgroundColor',
|
'backgroundColor',
|
||||||
'bottomAppBarColor',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
final DiagnosticPropertiesBuilder properties = DiagnosticPropertiesBuilder();
|
final DiagnosticPropertiesBuilder properties = DiagnosticPropertiesBuilder();
|
||||||
|
|
Loading…
Reference in a new issue