Unverified Commit 7c4c3419 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Remove accentColor et al. from tests (#78449)

parent 93a5d17a
...@@ -286,7 +286,7 @@ class StockHomeState extends State<StockHome> { ...@@ -286,7 +286,7 @@ class StockHomeState extends State<StockHome> {
AppBar buildSearchBar() { AppBar buildSearchBar() {
return AppBar( return AppBar(
leading: BackButton( leading: BackButton(
color: Theme.of(context).accentColor, color: Theme.of(context).colorScheme.secondary,
), ),
title: TextField( title: TextField(
controller: _searchQuery, controller: _searchQuery,
...@@ -310,7 +310,7 @@ class StockHomeState extends State<StockHome> { ...@@ -310,7 +310,7 @@ class StockHomeState extends State<StockHome> {
return FloatingActionButton( return FloatingActionButton(
tooltip: 'Create company', tooltip: 'Create company',
child: const Icon(Icons.add), child: const Icon(Icons.add),
backgroundColor: Theme.of(context).accentColor, backgroundColor: Theme.of(context).colorScheme.secondary,
onPressed: _handleCreateCompany, onPressed: _handleCreateCompany,
); );
} }
......
...@@ -437,7 +437,7 @@ class _DiamondFab extends StatelessWidget { ...@@ -437,7 +437,7 @@ class _DiamondFab extends StatelessWidget {
width: 56.0, width: 56.0,
height: 56.0, height: 56.0,
child: IconTheme.merge( child: IconTheme.merge(
data: IconThemeData(color: Theme.of(context).accentIconTheme.color), data: IconThemeData(color: Theme.of(context).colorScheme.secondary),
child: child!, child: child!,
), ),
), ),
......
...@@ -204,13 +204,10 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> { ...@@ -204,13 +204,10 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
} }
void main() { void main() {
runApp(MaterialApp( runApp(
theme: ThemeData( const MaterialApp(
brightness: Brightness.light,
primarySwatch: Colors.blue,
accentColor: Colors.redAccent,
),
title: 'Cards', title: 'Cards',
home: const OverlayGeometryApp(), home: OverlayGeometryApp(),
)); ),
);
} }
...@@ -141,13 +141,10 @@ class PageViewAppState extends State<PageViewApp> { ...@@ -141,13 +141,10 @@ class PageViewAppState extends State<PageViewApp> {
} }
void main() { void main() {
runApp(MaterialApp( runApp(
const MaterialApp(
title: 'PageView', title: 'PageView',
theme: ThemeData( home: PageViewApp(),
brightness: Brightness.light,
primarySwatch: Colors.blue,
accentColor: Colors.redAccent,
), ),
home: const PageViewApp(), );
));
} }
...@@ -1848,7 +1848,7 @@ void main() { ...@@ -1848,7 +1848,7 @@ void main() {
child: Text('This is a Material persistent bottom sheet. Drag downwards to dismiss it.', child: Text('This is a Material persistent bottom sheet. Drag downwards to dismiss it.',
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: themeData.accentColor, color: themeData.colorScheme.secondary,
fontSize: 24.0, fontSize: 24.0,
), ),
), ),
......
...@@ -690,14 +690,12 @@ void main() { ...@@ -690,14 +690,12 @@ void main() {
}, },
); );
final ThemeData theme = ThemeData.raw( final ThemeData theme = ThemeData.light().copyWith(
visualDensity: VisualDensity.standard, visualDensity: VisualDensity.standard,
primaryColor: Colors.black, primaryColor: Colors.black,
primaryColorBrightness: Brightness.dark, primaryColorBrightness: Brightness.dark,
primaryColorLight: Colors.black, primaryColorLight: Colors.black,
primaryColorDark: Colors.black, primaryColorDark: Colors.black,
accentColor: Colors.black,
accentColorBrightness: Brightness.dark,
canvasColor: Colors.black, canvasColor: Colors.black,
shadowColor: Colors.black, shadowColor: Colors.black,
scaffoldBackgroundColor: Colors.black, scaffoldBackgroundColor: Colors.black,
...@@ -727,11 +725,9 @@ void main() { ...@@ -727,11 +725,9 @@ void main() {
toggleableActiveColor: Colors.black, toggleableActiveColor: Colors.black,
textTheme: ThemeData.dark().textTheme, textTheme: ThemeData.dark().textTheme,
primaryTextTheme: ThemeData.dark().textTheme, primaryTextTheme: ThemeData.dark().textTheme,
accentTextTheme: ThemeData.dark().textTheme,
inputDecorationTheme: ThemeData.dark().inputDecorationTheme.copyWith(border: const OutlineInputBorder()), inputDecorationTheme: ThemeData.dark().inputDecorationTheme.copyWith(border: const OutlineInputBorder()),
iconTheme: ThemeData.dark().iconTheme, iconTheme: ThemeData.dark().iconTheme,
primaryIconTheme: ThemeData.dark().iconTheme, primaryIconTheme: ThemeData.dark().iconTheme,
accentIconTheme: ThemeData.dark().iconTheme,
sliderTheme: sliderTheme, sliderTheme: sliderTheme,
tabBarTheme: const TabBarTheme(labelColor: Colors.black), tabBarTheme: const TabBarTheme(labelColor: Colors.black),
tooltipTheme: const TooltipThemeData(height: 100), tooltipTheme: const TooltipThemeData(height: 100),
......
...@@ -5888,8 +5888,11 @@ void main() { ...@@ -5888,8 +5888,11 @@ void main() {
testWidgets('TextEditingController.buildTextSpan receives build context', (WidgetTester tester) async { testWidgets('TextEditingController.buildTextSpan receives build context', (WidgetTester tester) async {
final _AccentColorTextEditingController controller = _AccentColorTextEditingController('a'); final _AccentColorTextEditingController controller = _AccentColorTextEditingController('a');
const Color color = Color.fromARGB(255, 1, 2, 3); const Color color = Color.fromARGB(255, 1, 2, 3);
final ThemeData lightTheme = ThemeData.light();
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
theme: ThemeData.light().copyWith(accentColor: color), theme: lightTheme.copyWith(
colorScheme: lightTheme.colorScheme.copyWith(secondary: color),
),
home: EditableText( home: EditableText(
controller: controller, controller: controller,
focusNode: FocusNode(), focusNode: FocusNode(),
...@@ -7559,7 +7562,7 @@ class _AccentColorTextEditingController extends TextEditingController { ...@@ -7559,7 +7562,7 @@ class _AccentColorTextEditingController extends TextEditingController {
@override @override
TextSpan buildTextSpan({required BuildContext context, TextStyle? style, required bool withComposing}) { TextSpan buildTextSpan({required BuildContext context, TextStyle? style, required bool withComposing}) {
final Color color = Theme.of(context).accentColor; final Color color = Theme.of(context).colorScheme.secondary;
return super.buildTextSpan(context: context, style: TextStyle(color: color), withComposing: withComposing); return super.buildTextSpan(context: context, style: TextStyle(color: color), withComposing: withComposing);
} }
} }
......
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