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