1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +00:00

Styling revamp using CupertinoThemeData and CupertinoTextThemeData (#593)

This commit is contained in:
Alex Vavvas
2020-12-02 09:04:33 +02:00
committed by GitHub
parent 1d33b3dcf7
commit 7c5fecbceb
11 changed files with 167 additions and 238 deletions

View File

@@ -41,7 +41,8 @@ class _TriviaViewState extends State<TriviaView> with RestorationMixin {
Trivia get currentTrivia => veggie.trivia[triviaIndex.value];
/// The current state of the game.
_RestorablePlayerStatus status = _RestorablePlayerStatus(PlayerStatus.readyToAnswer);
_RestorablePlayerStatus status =
_RestorablePlayerStatus(PlayerStatus.readyToAnswer);
@override
String get restorationId => widget.restorationId;
@@ -135,25 +136,19 @@ class _TriviaViewState extends State<TriviaView> with RestorationMixin {
style: Styles.triviaFinishedTitleText(themeData),
),
SizedBox(height: 16),
Text(
'You answered',
style: Styles.triviaFinishedText(themeData),
),
Text('You answered', style: themeData.textTheme.textStyle),
Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
'$score',
'${score.value}',
style: Styles.triviaFinishedBigText(themeData),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
' of ',
style: Styles.triviaFinishedText(themeData),
),
child: Text(' of ', style: themeData.textTheme.textStyle),
),
Text(
'${veggie.trivia.length}',
@@ -161,10 +156,7 @@ class _TriviaViewState extends State<TriviaView> with RestorationMixin {
),
],
),
Text(
'questions correctly!',
style: Styles.triviaFinishedText(themeData),
),
Text('questions correctly!', style: themeData.textTheme.textStyle),
SizedBox(height: 16),
CupertinoButton(
child: Text('Try Again'),