Skip to content

Commit

Permalink
feat(app): initially expand lists
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Feb 24, 2025
1 parent d42eff2 commit 3f86aba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/lib/common/widgets/drug_list/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions app/lib/report/pages/gene.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ 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),
);

final GenotypeResult genotypeResult;
final DrugListCubit cubit;
final bool initiallyExpandFurtherMedications;

@override
Widget build(BuildContext context) {
Expand All @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions app/lib/report/pages/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -373,7 +373,6 @@ class GeneCard extends StatelessWidget {
// ignore: use_build_context_synchronously
await context.router.push(GeneRoute(
genotypeResult: genotypeResult,
initiallyExpandFurtherMedications: !onlyCurrentMedications,
));
},
radius: 16,
Expand Down

0 comments on commit 3f86aba

Please sign in to comment.