softer colors

This commit is contained in:
ycc 2024-02-11 14:16:07 +01:00
parent 4717dda0a3
commit a8d54d260c

View File

@ -12,7 +12,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
title: 'Sept !!',
theme: ThemeData(
// This is the theme of your application.
//
@ -82,9 +82,11 @@ class _MyHomePageState extends State<MyHomePage> {
setState(() {
_key = " ";
// check if the key is a letter between a and z
if (key.length == 1 && key.codeUnitAt(0) >= 65 && key.codeUnitAt(0) <= 90) _key = key;
if (key.length == 1 && key.codeUnitAt(0) >= 65 && key.codeUnitAt(0) <= 90)
_key = key;
// check if the key is a number between 0 and 9
if (key.length == 1 && key.codeUnitAt(0) >= 48 && key.codeUnitAt(0) <= 57) _key = key;
if (key.length == 1 && key.codeUnitAt(0) >= 48 && key.codeUnitAt(0) <= 57)
_key = key;
});
return true;
}
@ -120,11 +122,13 @@ class _MyHomePageState extends State<MyHomePage> {
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
backgroundColor: Colors.black45,
appBar: AppBar(
// TRY THIS: Try changing the color here to a specific color (to
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
// change color while the other colors stay the same.
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
backgroundColor: Colors.blueGrey,
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
@ -146,11 +150,17 @@ class _MyHomePageState extends State<MyHomePage> {
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
// action in the IDE, or press "p" in the console), to see the
// wireframe for each widget.
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'$_key',
style: Theme.of(context).textTheme.headlineLarge,
// set text color to white
style: TextStyle(
color: Colors.lightGreen,
fontSize: 160.0, // Change this to your preferred color
),
),
],
),