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;
return Scaffold(
body: Column(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('A random wordpair:'),
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}",
),
),
);
}