xxxxxxxxxx
colorScheme: ColorScheme(
primary: Colors.red, // focus
onPrimary: Colors.black,
primaryVariant: Colors.orange,
background: Colors.red,
onBackground: Colors.black,
secondary: Colors.red, //float action button
onSecondary: Colors.white,
secondaryVariant: Colors.deepOrange,
error: Colors.black,
onError: Colors.white,
surface: Colors.white, // AppBar
onSurface: Colors.black, //icons, inputs
brightness: Brightness.light,
),
xxxxxxxxxx
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
theme: ThemeData(
colorScheme: ColorScheme(
brightness: Brightness.light,
primary: Colors.green,
onPrimary: Colors.green,
secondary: Colors.black87,
onSecondary: Colors.black38,
background: Colors.blue,
onBackground: Colors.white70,
onError: Colors.red.shade400,
error: Colors.red.shade700,
surface: Colors.orange.shade200,
onSurface: Colors.orange.shade600,
),
),
home: const HomePage(),
);
}