From 9d0db1d518662bc6fe0dd07df53eb3828e4dd826 Mon Sep 17 00:00:00 2001 From: tamslo Date: Fri, 29 Nov 2024 16:07:39 +0100 Subject: [PATCH] feat(app): change order of report indicator --- app/lib/report/pages/report.dart | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/lib/report/pages/report.dart b/app/lib/report/pages/report.dart index 049585d5..ac0f5b54 100644 --- a/app/lib/report/pages/report.dart +++ b/app/lib/report/pages/report.dart @@ -132,18 +132,23 @@ class ReportPage extends HookWidget { return SizedBox.shrink(); } var indicatorText = ''; + if (currentListOption.drugSubset != null) { + final listHelperText = context.l10n.show_all_dropdown_text( + context.l10n.report_show_all_dropdown_item, + context.l10n.report_show_all_dropdown_items, + ); + indicatorText = listHelperText; + } if (hasActiveInhibitors) { - indicatorText = context.l10n.report_page_indicator_explanation( + final inhibitorText = context.l10n.report_page_indicator_explanation( drugInteractionIndicatorName, drugInteractionIndicator ); - } - if (currentListOption.drugSubset != null) { - indicatorText = '$indicatorText\n\n' - '${context.l10n.show_all_dropdown_text( - context.l10n.report_show_all_dropdown_item, - context.l10n.report_show_all_dropdown_items, - )}'; + if (indicatorText.isNotBlank) { + indicatorText = '$indicatorText\n\n$inhibitorText'; + } else { + indicatorText = inhibitorText; + } } return PageIndicatorExplanation(indicatorText); }