Skip to content

Commit

Permalink
Checkup style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ferndot committed Mar 15, 2020
1 parent d98e940 commit 129705f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/src/ui/screens/checkup/steps/breath.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class _BreathStepState extends State<BreathStep> {
@override
Widget build(BuildContext context) {
return QuestionView(
padding: EdgeInsets.only(bottom: 50),
questions: [
Question(
title: Text('Are you experiencing shortness of breath?'),
Expand Down
1 change: 1 addition & 0 deletions lib/src/ui/screens/checkup/steps/cough.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class _CoughStepState extends State<CoughStep> {
@override
Widget build(BuildContext context) {
return QuestionView(
padding: EdgeInsets.only(bottom: 50),
questions: [
Question(
title: Text('Do you have a cough?'),
Expand Down
8 changes: 6 additions & 2 deletions lib/src/ui/screens/checkup/steps/intro.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,27 @@ class _IntroStepState extends State<IntroStep> {
@override
Widget build(BuildContext context) {
return QuestionView(
padding: EdgeInsets.only(bottom: 50),
questions: [
Question(
title: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.only(bottom: 40),
padding: EdgeInsets.only(bottom: 20),
child: FaIcon(
FontAwesomeIcons.check,
color: Colors.white.withOpacity(0.7),
size: 100,
),
),
Text(
"It's time for your checkup. This blurb will prepare you for it and highlight your right to submit only the data that you choose.",
"It's time for your checkup.",
),
],
),
subtitle: Text(
"This blurb will prepare you for it and highlight your right to submit only the data that you choose.",
),
),
],
);
Expand Down
23 changes: 16 additions & 7 deletions lib/src/ui/widgets/question_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ class Question {
class QuestionView extends StatefulWidget {
final List<Question> questions;
final Color color;
final EdgeInsetsGeometry padding;

const QuestionView({@required this.questions, this.color});
const QuestionView({
@required this.questions,
this.color,
this.padding,
});

@override
_QuestionViewState createState() => _QuestionViewState();
Expand All @@ -37,12 +42,15 @@ class _QuestionViewState extends State<QuestionView> {
),
),
if (question.subtitle != null)
DefaultTextStyle(
child: question.subtitle,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.subtitle.copyWith(
color: Colors.white,
),
Padding(
padding: EdgeInsets.only(top: 20),
child: DefaultTextStyle(
child: question.subtitle,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.subtitle.copyWith(
color: Colors.white,
),
),
),
if (question.input != null)
Padding(
Expand All @@ -58,6 +66,7 @@ class _QuestionViewState extends State<QuestionView> {
@override
Widget build(BuildContext context) {
return Container(
padding: widget.padding,
color: widget.color ?? Theme.of(context).primaryColor,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down

0 comments on commit 129705f

Please sign in to comment.