-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
172 additions
and
181 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
app/lib/common/widgets/disclaimers/cards/included_content_disclaimer_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import '../../../module.dart'; | ||
|
||
class IncludedContentDisclaimerCard extends StatelessWidget { | ||
const IncludedContentDisclaimerCard({super.key, required this.type}); | ||
|
||
final ListInclusionDescriptionType type; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final text = type == ListInclusionDescriptionType.genes | ||
? TextSpan( | ||
text: context.l10n.included_content_disclaimer_text( | ||
context.l10n.included_content_genes, | ||
context.l10n.included_content_inclusion_genes, | ||
), | ||
) | ||
: TextSpan( | ||
children: [ | ||
TextSpan( | ||
text: context.l10n.included_content_disclaimer_text( | ||
context.l10n.included_content_medications, | ||
context.l10n.included_content_inclusion_medications, | ||
), | ||
), | ||
TextSpan(text: '\n\n'), | ||
TextSpan( | ||
text: context.l10n.included_content_addition, | ||
style: TextStyle(fontStyle: FontStyle.italic), | ||
), | ||
] | ||
); | ||
return DisclaimerCard( | ||
iconWidget: IncludedContentIcon( | ||
type: type, | ||
color: PharMeTheme.onSurfaceText, | ||
size: defaultDisclaimerCardIconSize, | ||
), | ||
iconPadding: EdgeInsets.all(PharMeTheme.smallSpace * 0.3), | ||
textWidget: Text.rich(text), | ||
); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
app/lib/common/widgets/disclaimers/cards/pgx_info_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import '../../../module.dart'; | ||
|
||
class PgxInfoCard extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) => DisclaimerCard( | ||
icon: Icons.info, | ||
iconPadding: EdgeInsets.all(PharMeTheme.smallSpace * 0.1), | ||
textWidget: Text.rich( | ||
TextSpan( | ||
children: [ | ||
TextSpan( | ||
text: '${context.l10n.pgx_abbreviation} ', | ||
style: TextStyle(fontWeight: FontWeight.bold), | ||
), | ||
TextSpan( | ||
text: context.l10n.pharmacogenomics_info_box_text, | ||
), | ||
] | ||
), | ||
), | ||
); | ||
} |
7 changes: 1 addition & 6 deletions
7
...laimers/professional_disclaimer_card.dart → ...s/cards/professional_disclaimer_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import '../../module.dart'; | ||
import '../../../module.dart'; | ||
|
||
class ProfessionalDisclaimerCard extends StatelessWidget { | ||
const ProfessionalDisclaimerCard({super.key, this.elevation}); | ||
|
||
final double? elevation; | ||
|
||
@override | ||
Widget build(BuildContext context) => DisclaimerCard( | ||
text: context.l10n.drugs_page_main_disclaimer_text, | ||
elevation: elevation, | ||
); | ||
} |
7 changes: 1 addition & 6 deletions
7
...s/disclaimers/puzzle_disclaimer_card.dart → ...laimers/cards/puzzle_disclaimer_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | ||
|
||
import '../../module.dart'; | ||
import '../../../module.dart'; | ||
|
||
class PuzzleDisclaimerCard extends StatelessWidget { | ||
const PuzzleDisclaimerCard({super.key, this.elevation}); | ||
|
||
final double? elevation; | ||
|
||
@override | ||
Widget build(BuildContext context) => DisclaimerCard( | ||
icon: FontAwesomeIcons.puzzlePiece, | ||
iconPadding: EdgeInsets.all(PharMeTheme.smallSpace * 0.4), | ||
text: context.l10n.drugs_page_puzzle_disclaimer_text, | ||
elevation: elevation, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
app/lib/common/widgets/disclaimers/included_medications_disclaimer_card.dart
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.