From 3f86abae523d55733d0b52b1644ee846845f9c70 Mon Sep 17 00:00:00 2001 From: tamslo Date: Mon, 24 Feb 2025 16:54:52 +0100 Subject: [PATCH] feat(app): initially expand lists --- app/lib/common/widgets/drug_list/builder.dart | 2 +- app/lib/report/pages/gene.dart | 4 +--- app/lib/report/pages/report.dart | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/lib/common/widgets/drug_list/builder.dart b/app/lib/common/widgets/drug_list/builder.dart index 2c01d6d1..3beb66d9 100644 --- a/app/lib/common/widgets/drug_list/builder.dart +++ b/app/lib/common/widgets/drug_list/builder.dart @@ -17,7 +17,7 @@ class DrugList extends HookWidget { this.noDrugsMessage, this.buildDrugItems = buildDrugCards, this.showDrugInteractionIndicator = false, - this.initiallyExpandFurtherMedications = false, + this.initiallyExpandFurtherMedications = true, this.searchForDrugClass = true, this.drugActivityChangeable = false, required this.buildContainer, diff --git a/app/lib/report/pages/gene.dart b/app/lib/report/pages/gene.dart index 85f88df8..1aa57f6c 100644 --- a/app/lib/report/pages/gene.dart +++ b/app/lib/report/pages/gene.dart @@ -5,7 +5,7 @@ import '../../drug/widgets/module.dart'; @RoutePage() class GenePage extends HookWidget { - GenePage(this.genotypeResult, {this.initiallyExpandFurtherMedications = false}) + GenePage(this.genotypeResult) : cubit = DrugListCubit( initialFilter: FilterState.forGenotypeKey(genotypeResult.key.value), @@ -13,7 +13,6 @@ class GenePage extends HookWidget { final GenotypeResult genotypeResult; final DrugListCubit cubit; - final bool initiallyExpandFurtherMedications; @override Widget build(BuildContext context) { @@ -28,7 +27,6 @@ class GenePage extends HookWidget { state: state, activeDrugs: activeDrugs, noDrugsMessage: context.l10n.gene_page_no_relevant_drugs, - initiallyExpandFurtherMedications: initiallyExpandFurtherMedications, buildContainer: ({ children, indicator, diff --git a/app/lib/report/pages/report.dart b/app/lib/report/pages/report.dart index 342e4319..4b6aa890 100644 --- a/app/lib/report/pages/report.dart +++ b/app/lib/report/pages/report.dart @@ -12,7 +12,7 @@ enum SortOption { @RoutePage() class ReportPage extends HookWidget { - const ReportPage({@visibleForTesting this.allGenesInitiallyExpanded = false}); + const ReportPage({this.allGenesInitiallyExpanded = true}); final bool allGenesInitiallyExpanded; @@ -373,7 +373,6 @@ class GeneCard extends StatelessWidget { // ignore: use_build_context_synchronously await context.router.push(GeneRoute( genotypeResult: genotypeResult, - initiallyExpandFurtherMedications: !onlyCurrentMedications, )); }, radius: 16,