Skip to content

Commit

Permalink
feat: improve trivia data view
Browse files Browse the repository at this point in the history
  • Loading branch information
luisburgos committed Sep 24, 2022
1 parent 7e09d8e commit 0092b3e
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions example/lib/shared/modules/trivia/components/trivia_data_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ class TriviaDataView extends StatelessWidget {
return LabeledSection(
label: 'TriviaData',
backgroundColor: Colors.blueGrey,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
_TriviaDataViewLabel(hostName),
_TriviaDataViewLabel(triviaName),
_TriviaDataViewLabel(triviaDescription),
_TriviaDataViewLabel(triviaMainQuestion),
],
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_TriviaDataViewLabel('hostName: $hostName'),
_TriviaDataViewLabel('triviaName: $triviaName'),
_TriviaDataViewLabel('triviaDescription: $triviaDescription'),
_TriviaDataViewLabel('triviaMainQuestion: $triviaMainQuestion'),
],
),
),
);
}
Expand All @@ -47,11 +50,9 @@ class _TriviaDataViewLabel extends StatelessWidget {
return Padding(
padding: const EdgeInsets.symmetric(
vertical: 4,
horizontal: 12,
),
child: Center(
child: Text(content),
horizontal: 10,
),
child: Text(content),
);
}
}

0 comments on commit 0092b3e

Please sign in to comment.