From 43f8fefce601462769d1c7f0cef5a5d6e6d96244 Mon Sep 17 00:00:00 2001 From: Tamara Slosarek Date: Mon, 26 Feb 2024 16:44:16 +0100 Subject: [PATCH] feat(#691): adapt 'currently taken drugs' wording and make automaticallyImplyLeading configurable --- .../widgets/drug_list/drug_items/drug_checkbox_list.dart | 2 ++ app/lib/common/widgets/page_scaffold.dart | 3 ++- app/lib/l10n/app_en.arb | 6 +++--- app/lib/search/pages/search.dart | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/lib/common/widgets/drug_list/drug_items/drug_checkbox_list.dart b/app/lib/common/widgets/drug_list/drug_items/drug_checkbox_list.dart index af81e345..c733cccd 100644 --- a/app/lib/common/widgets/drug_list/drug_items/drug_checkbox_list.dart +++ b/app/lib/common/widgets/drug_list/drug_items/drug_checkbox_list.dart @@ -35,11 +35,13 @@ List buildDrugCheckboxList( SubheaderDivider( text: context.l10n.drug_selection_subheader_active_drugs, key: Key('header-active'), + useLine: false, ), ...activeDrugsList, SubheaderDivider( text: context.l10n.drug_selection_subheader_all_drugs, key: Key('header-all'), + useLine: false, ), ...allDrugsList, ]; diff --git a/app/lib/common/widgets/page_scaffold.dart b/app/lib/common/widgets/page_scaffold.dart index 8406c308..a913c53a 100644 --- a/app/lib/common/widgets/page_scaffold.dart +++ b/app/lib/common/widgets/page_scaffold.dart @@ -71,6 +71,7 @@ Scaffold unscrollablePageScaffold({ String? barBottom, List? actions, Widget? drawer, + bool automaticallyImplyLeading = true, Key? key, }) { final appBar = title == null @@ -80,7 +81,7 @@ Scaffold unscrollablePageScaffold({ foregroundColor: PharMeTheme.appBarTheme.foregroundColor, elevation: PharMeTheme.appBarTheme.elevation, leadingWidth: PharMeTheme.appBarTheme.leadingWidth, - automaticallyImplyLeading: false, + automaticallyImplyLeading: automaticallyImplyLeading, centerTitle: PharMeTheme.appBarTheme.centerTitle, title: buildTitle(title), actions: actions, diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 7fc4be3b..b3aa83bf 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -31,10 +31,10 @@ "genetic_information_text_part_2": ", a service of the National Library of Medicine.", "genetic_information_source": "MedlinePlus", - "drug_selection_header": "Select active drugs", + "drug_selection_header": "Currently taken drugs", "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_active_drugs": "Selected drugs", "drug_selection_subheader_all_drugs": "All drugs", "drug_selection_no_active_drugs": "No drugs selected", @@ -317,7 +317,7 @@ } } }, - "pdf_activity_score_overwrite": "{originalScore} adjusted based on active medications, see phenotype", + "pdf_activity_score_overwrite": "{originalScore} adjusted based on currently taken medications, see phenotype", "@pdf_activity_score_overwrite": { "placeholders": { "originalScore": { diff --git a/app/lib/search/pages/search.dart b/app/lib/search/pages/search.dart index 71ded84d..60f2f4a7 100644 --- a/app/lib/search/pages/search.dart +++ b/app/lib/search/pages/search.dart @@ -38,6 +38,7 @@ class SearchPage extends HookWidget { activeDrugs, useDrugClass: useDrugClass, ), + automaticallyImplyLeading: false, // do not show leading "menu" icon ), ), );