-
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.
feat(app): use Text widget for links (RichText not reacting to iOS te…
…xt size change)
- Loading branch information
Showing
8 changed files
with
55 additions
and
54 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ Uri keycloakUrl([String slug = '']) => | |
|
||
// Note that sending emails will not work on the iPhone Simulator since it does | ||
// not have any email application installed. | ||
String _mailContact = '[email protected]'; | ||
String contactEmailAddress = '[email protected]'; | ||
// Workaround according to https://pub.dev/packages/url_launcher#encoding-urls | ||
String? _encodeQueryParameters(Map<String, String> params) { | ||
return params.entries | ||
|
@@ -24,7 +24,7 @@ Future<void> sendEmail({ | |
await launchUrl( | ||
Uri( | ||
scheme: 'mailto', | ||
path: _mailContact, | ||
path: contactEmailAddress, | ||
query: _encodeQueryParameters({ | ||
'subject': subject, | ||
'body': body, | ||
|
@@ -33,8 +33,13 @@ Future<void> sendEmail({ | |
); | ||
} | ||
|
||
final geneticInformationUrl = Uri.https( | ||
'medlineplus.gov', | ||
'/genetics/understanding/', | ||
); | ||
|
||
Future<void> openFurtherGeneticInformation() async => | ||
launchUrl(Uri.https('medlineplus.gov', '/genetics/understanding/')); | ||
launchUrl(geneticInformationUrl); | ||
|
||
final cpicMaxCacheTime = Duration(days: 90); | ||
const maxCachedDrugs = 10; | ||
|
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 Hyperlink extends StatelessWidget { | ||
const Hyperlink({ required this.text, required this.onTap }); | ||
final String text; | ||
final void Function() onTap; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return GestureDetector( | ||
onTap: onTap, | ||
child: Text( | ||
text, | ||
style: TextStyle( | ||
color: PharMeTheme.secondaryColor, | ||
decoration: TextDecoration.underline, | ||
decorationColor: PharMeTheme.secondaryColor, | ||
), | ||
), | ||
); | ||
} | ||
} |
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
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