Finished styling section.
This commit is contained in:
parent
66e1f3a05b
commit
71b76ecb2d
@ -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}",
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user