From 71b76ecb2de136558454771ed624fa9e79fd5738 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 30 Jan 2025 11:57:54 -0700 Subject: [PATCH] Finished styling section. --- namer_app/lib/main.dart | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/namer_app/lib/main.dart b/namer_app/lib/main.dart index 4f1d602..0584d75 100644 --- a/namer_app/lib/main.dart +++ b/namer_app/lib/main.dart @@ -42,18 +42,20 @@ class MyHomePage extends StatelessWidget { var pair = appState.current; return Scaffold( - body: Column( - children: [ - Text('A random wordpair:'), - BigCard(pair: pair), - ElevatedButton( - onPressed: () { - appState.getNext(); - }, - child: Text('Next'), - ), - - ], + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + BigCard(pair: pair), + SizedBox(height: 10.0), // Just a spacer. + ElevatedButton( + onPressed: () { + appState.getNext(); + }, + child: Text('Next'), + ), + ], + ), ), ); } @@ -74,12 +76,15 @@ class BigCard extends StatelessWidget { color: theme.colorScheme.onPrimary, ); - return Card( color: theme.colorScheme.primary, child: Padding( padding: const EdgeInsets.all(15.0), - child: Text(pair.asLowerCase, style: style), + child: Text( + pair.asLowerCase, + style: style, + semanticsLabel: "${pair.first} ${pair.second}", + ), ), ); }