diff --git a/app/lib/drug/widgets/annotation_cards/disclaimer.dart b/app/lib/drug/widgets/annotation_cards/disclaimer.dart index 1ad4181c..6cd159fc 100644 --- a/app/lib/drug/widgets/annotation_cards/disclaimer.dart +++ b/app/lib/drug/widgets/annotation_cards/disclaimer.dart @@ -1,3 +1,5 @@ +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + import '../../../common/module.dart'; class Disclaimer extends StatelessWidget { @@ -34,16 +36,19 @@ class Disclaimer extends StatelessWidget { text: context.l10n.drugs_page_disclaimer_text_part_0, style: TextStyle(fontWeight: FontWeight.w500), ), - if (userGuideline != null) TextSpan( + TextSpan( children: [ TextSpan(text: '\n\n'), - TextSpan(text: context.l10n.drugs_page_disclaimer_text_part_1), + WidgetSpan( + child: Icon( + FontAwesomeIcons.puzzlePiece, + size: PharMeTheme.mediumSpace, + color: PharMeTheme.onSurfaceText, + ), + ), TextSpan(text: ' '), - TextSpan(text: context.l10n.drugs_page_disclaimer_text_part_2), + TextSpan(text: context.l10n.onboarding_1_disclaimer), ], - style: PharMeTheme.textTheme.labelMedium!.copyWith( - fontWeight: FontWeight.w300, - ), ) ]), ), diff --git a/app/lib/drug/widgets/annotation_cards/guideline.dart b/app/lib/drug/widgets/annotation_cards/guideline.dart index 6e06bf81..d9db1492 100644 --- a/app/lib/drug/widgets/annotation_cards/guideline.dart +++ b/app/lib/drug/widgets/annotation_cards/guideline.dart @@ -27,8 +27,10 @@ class GuidelineAnnotationCard extends StatelessWidget { ..._buildHeader(context), SizedBox(height: PharMeTheme.mediumSpace), _buildCard(context), - SizedBox(height: PharMeTheme.mediumSpace), + SizedBox(height: PharMeTheme.smallSpace), _buildSourcesSection(context), + SizedBox(height: PharMeTheme.smallSpace), + Disclaimer(userGuideline: drug.userGuideline), ] else ...[ ..._buildHeader(context), @@ -108,8 +110,6 @@ class GuidelineAnnotationCard extends StatelessWidget { ]), ), ], - SizedBox(height: PharMeTheme.smallToMediumSpace), - Disclaimer(userGuideline: drug.userGuideline), ] ) ); diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 61733194..2f595c3e 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -133,10 +133,6 @@ "@drugs_page_disclaimer_description": {}, "drugs_page_disclaimer_text_part_0": "Never stop taking or change the dose of your medications without consulting your pharmacist or doctor.", "@drugs_page_disclaimer_text_part_0": {}, - "drugs_page_disclaimer_text_part_1": "Also, the information shown on this page is ONLY based on your DNA and certain medications you are currently taking.", - "@drugs_page_disclaimer_text_part_1": {}, - "drugs_page_disclaimer_text_part_2": "Other important factors like weight, age, pre-existing conditions, and further medication interactions are not considered.", - "@drugs_page_disclaimer_text_part_2": {}, "drugs_page_is_inhibitor": "Taking {drugName} can interact with your results for the following gene(s): {genes}", "@drugs_page_is_inhibitor": { "placeholders": { @@ -473,8 +469,8 @@ "@onboarding_1_text": {}, "onboarding_2_header": "One size does not fit all", "@onboarding_2_header": {}, - "onboarding_1_disclaimer_part_1": "The information provided in PharMe is ONLY based on your DNA and certain medications that may interact with your genetic result.", - "@onboarding_1_disclaimer_part_1": {}, + "onboarding_1_disclaimer": "The information from PharMe is like one puzzle piece in the big picture of how well a medicine works for you.\n\nThe information provided here is based ONLY on your DNA and certain medications that may interact with your genetic result. Other important factors like weight, age, pre-existing conditions, and further medication interactions are not considered.", + "@onboarding_1_disclaimer": {}, "onboarding_2_text": "Each person’s body reacts to medications differently.\n\nMedications that are effective for a majority of people can have adverse side effects for you.", "@onboarding_2_text": {}, "onboarding_3_header": "Genome power unlocked to improve human health", diff --git a/app/lib/onboarding/pages/onboarding.dart b/app/lib/onboarding/pages/onboarding.dart index 2bb37f27..9add4079 100644 --- a/app/lib/onboarding/pages/onboarding.dart +++ b/app/lib/onboarding/pages/onboarding.dart @@ -1,3 +1,5 @@ +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + import '../../../common/module.dart' hide MetaData; import '../../common/models/metadata.dart'; @@ -17,9 +19,8 @@ class OnboardingPage extends HookWidget { header: context.l10n.onboarding_1_header, text: context.l10n.onboarding_1_text, color: PharMeTheme.sinaiCyan, - child: DisclaimerCard( - text: context.l10n.onboarding_1_disclaimer_part_1, - secondLineText: context.l10n.drugs_page_disclaimer_text_part_2, + bottom: DisclaimerCard( + text: context.l10n.onboarding_3_disclaimer, ), ), OnboardingSubPage( @@ -37,8 +38,9 @@ class OnboardingPage extends HookWidget { header: context.l10n.onboarding_3_header, text: context.l10n.onboarding_3_text, color: PharMeTheme.sinaiPurple, - child: DisclaimerCard( - text: context.l10n.onboarding_3_disclaimer, + bottom: DisclaimerCard( + icon: FontAwesomeIcons.puzzlePiece, + text: context.l10n.onboarding_1_disclaimer, ), ), OnboardingSubPage( @@ -295,7 +297,8 @@ class OnboardingSubPage extends HookWidget { required this.text, required this.color, required this.availableHeight, - this.child, + this.top, + this.bottom, }); final String illustrationPath; @@ -304,7 +307,8 @@ class OnboardingSubPage extends HookWidget { final String text; final double availableHeight; final Color color; - final Widget? child; + final Widget? top; + final Widget? bottom; double? _getContentHeight(GlobalKey contentKey) { return contentKey.currentContext?.size?.height; @@ -418,15 +422,19 @@ class OnboardingSubPage extends HookWidget { maxLines: 2, ), SizedBox(height: PharMeTheme.mediumToLargeSpace), + if (top != null) ...[ + top!, + SizedBox(height: PharMeTheme.mediumSpace), + ], Text( text, style: PharMeTheme.textTheme.bodyLarge!.copyWith( color: Colors.white, ), ), - if (child != null) ...[ + if (bottom != null) ...[ SizedBox(height: PharMeTheme.mediumSpace), - child!, + bottom!, ], ]), // Empty widget for spaceBetween in this column to work properly @@ -474,7 +482,7 @@ class DisclaimerCard extends StatelessWidget { this.onClick, }); - final Icon? icon; + final IconData? icon; final String text; final String? secondLineText; final GestureTapCallback? onClick; @@ -491,7 +499,7 @@ class DisclaimerCard extends StatelessWidget { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - icon ?? Icon(Icons.warning_rounded, size: 32), + Icon(icon ?? Icons.warning_rounded, size: 32), SizedBox(width: PharMeTheme.smallSpace), Expanded( child: Column(