Skip to content

Commit

Permalink
Fix checkup view during checkup submission
Browse files Browse the repository at this point in the history
  • Loading branch information
ferndot committed Mar 21, 2020
1 parent 15d6383 commit dcd5b97
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 25 deletions.
3 changes: 2 additions & 1 deletion lib/src/ui/screens/checkup/checkup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ class _CheckupScreenState extends State<CheckupScreen> {
case CheckupStateCreating:
return _getUnloadedBody(checkupState);
case CheckupStateInProgress:
case CheckupStateCompleting:
return CheckupLoadedBody();
case CheckupStateCompleting:
return Container();
case CheckupStateCompleted:
_handleCheckupCompletion(preferencesState, checkupState);
return null;
Expand Down
8 changes: 0 additions & 8 deletions lib/src/ui/screens/checkup/steps/intro.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ class _IntroStepState extends State<IntroStep> {
Widget build(BuildContext context) {
return BlocBuilder<CheckupBloc, CheckupState>(
builder: (context, state) {
if (state is! CheckupStateInProgress) {
// We should never hit this, but if we do, let's
// navigate back to the beginning to make sure
// the checkup is created.
Navigator.pushNamed(context, CheckupScreen.routeName);
return Container();
}

final CheckupStateInProgress checkupState = state;
return SingleChildScrollView(
child: Column(
Expand Down
8 changes: 0 additions & 8 deletions lib/src/ui/screens/checkup/steps/subjective.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ class _SubjectiveStepState extends State<SubjectiveStep> {
final QuestionsStateLoaded questionState = state;
return BlocBuilder<CheckupBloc, CheckupState>(
builder: (context, state) {
if (state is! CheckupStateInProgress) {
// We should never hit this, but if we do, let's
// navigate back to the beginning to make sure
// the checkup is created.
Navigator.pushNamed(context, CheckupScreen.routeName);
return Container();
}

final CheckupStateInProgress checkupState = state;
return QuestionView(
padding: EdgeInsets.only(bottom: 80),
Expand Down
8 changes: 0 additions & 8 deletions lib/src/ui/screens/checkup/steps/temperature.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,6 @@ class _TemperatureStepState extends State<TemperatureStep> {
Widget build(BuildContext context) {
return BlocBuilder<CheckupBloc, CheckupState>(
builder: (context, state) {
if (state is! CheckupStateInProgress) {
// We should never hit this, but if we do, let's
// navigate back to the beginning to make sure
// the checkup is created.
Navigator.pushNamed(context, CheckupScreen.routeName);
return Container();
}

final CheckupStateInProgress checkupState = state;
final VitalsResponse existingResponse =
checkupState.checkup.vitalsResponses.firstWhere(
Expand Down

0 comments on commit dcd5b97

Please sign in to comment.