Finished styling section.

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

View File

@ -42,19 +42,21 @@ class MyHomePage extends StatelessWidget {
var pair = appState.current; var pair = appState.current;
return Scaffold( return Scaffold(
body: Column( body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text('A random wordpair:'),
BigCard(pair: pair), BigCard(pair: pair),
SizedBox(height: 10.0), // Just a spacer.
ElevatedButton( ElevatedButton(
onPressed: () { onPressed: () {
appState.getNext(); appState.getNext();
}, },
child: Text('Next'), 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}",
),
), ),
); );
} }