diff --git a/app/lib/drug_selection/pages/drug_selection.dart b/app/lib/drug_selection/pages/drug_selection.dart index 3ec15b7c..521ea3a3 100644 --- a/app/lib/drug_selection/pages/drug_selection.dart +++ b/app/lib/drug_selection/pages/drug_selection.dart @@ -10,10 +10,12 @@ import 'cubit.dart'; class DrugSelectionPage extends HookWidget { const DrugSelectionPage({ Key? key, + this.concludesOnboarding = false, @visibleForTesting this.cubit, }) : super(key: key); final DrugSelectionPageCubit? cubit; + final bool concludesOnboarding; @override Widget build(BuildContext context) { @@ -24,13 +26,14 @@ class DrugSelectionPage extends HookWidget { builder: (context, state) { return unscrollablePageScaffold( title: context.l10n.drug_selection_header, - barBottom: context.l10n.drug_selection_description, + barBottom: concludesOnboarding + ? context.l10n.drug_selection_onboarding_description + : null, padding: PharMeTheme.largeSpace, body: Column( children: [ Expanded(child: _buildDrugList(context, state)), - SizedBox(height: PharMeTheme.mediumSpace), - _buildButton(context, state), + if (concludesOnboarding) _buildButton(context, state), ], ), ); @@ -48,10 +51,13 @@ class DrugSelectionPage extends HookWidget { } Widget _buildButton(BuildContext context, DrugSelectionPageState state) { - return FullWidthButton( - context.l10n.action_continue, - () => overwriteRoutes(context, nextPage: MainRoute()), - enabled: _isEditable(state), + return Padding( + padding: EdgeInsets.only(top: PharMeTheme.mediumSpace), + child: FullWidthButton( + context.l10n.action_continue, + () => overwriteRoutes(context, nextPage: MainRoute()), + enabled: _isEditable(state), + ) ); } diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 84a9ee22..e1230bbf 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -9,7 +9,7 @@ "auth_success": "Successfully imported data", "drug_selection_header": "Select active drugs", - "drug_selection_description": "Please update the drugs you are currently taking below. You can always change the status for a drug later on a drug page or in the settings.", + "drug_selection_onboarding_description": "Please update which drugs you are currently taking below. You can always change the status for a drug later on a drug page or in the settings.", "drug_selection_no_drugs_loaded": "No drugs loaded", "drug_selection_subheader_active_drugs": "Active drugs", "drug_selection_subheader_all_drugs": "All drugs", diff --git a/app/lib/login/pages/login.dart b/app/lib/login/pages/login.dart index 89c4cc41..da0bd24d 100644 --- a/app/lib/login/pages/login.dart +++ b/app/lib/login/pages/login.dart @@ -117,7 +117,9 @@ class LoginPage extends HookWidget { return _buildColumnWrapper( action: () => overwriteRoutes( context, - nextPage: OnboardingRouter(nextPage: DrugSelectionRouter()), + nextPage: OnboardingRouter( + nextPage: DrugSelectionRouter(concludesOnboarding: true) + ), ), actionText: context.l10n.general_continue, children: [