Finished styling section.

This commit is contained in:
Hyperling 2025-01-30 11:57:54 -07:00
parent 66e1f3a05b
commit 71b76ecb2d

View File

@ -42,18 +42,20 @@ class MyHomePage extends StatelessWidget {
var pair = appState.current; var pair = appState.current;
return Scaffold( return Scaffold(
body: Column( body: Center(
children: [ child: Column(
Text('A random wordpair:'), mainAxisAlignment: MainAxisAlignment.center,
BigCard(pair: pair), children: [
ElevatedButton( BigCard(pair: pair),
onPressed: () { SizedBox(height: 10.0), // Just a spacer.
appState.getNext(); ElevatedButton(
}, onPressed: () {
child: Text('Next'), appState.getNext();
), },
child: Text('Next'),
], ),
],
),
), ),
); );
} }
@ -74,12 +76,15 @@ class BigCard extends StatelessWidget {
color: theme.colorScheme.onPrimary, color: theme.colorScheme.onPrimary,
); );
return Card( return Card(
color: theme.colorScheme.primary, color: theme.colorScheme.primary,
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Text(pair.asLowerCase, style: style), child: Text(
pair.asLowerCase,
style: style,
semanticsLabel: "${pair.first} ${pair.second}",
),
), ),
); );
} }