-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding health connect warning message. (#320)
* Merging recent changes (#319) * Creates a release on tag creation (#312) Github workflow to create a release and include an apk. * On login page init, check if user is authenticated and redirect to Invitations or Home page (#311) * Update permissions on Android, fix exception while uploading informed consent (#308) * fix of #301 * Update carp_backend.dart * Fix of #306 * update to pubspec to use CAMS ^1.8.0 * Update pubspec.lock * Update pubspec.lock --------- Co-authored-by: Aamir Farooq <[email protected]> * Fixed warning about deprecated use of gradle (#310) * initial commit * removed warnings about deprecated use of gradle --------- Co-authored-by: Aamir Farooq <[email protected]> * Fix an error caused by changes in latest version of CAMS (#315) * Migration needed for new version of CAMS * Fix test * Trigger TestFlight build. * bumping versions * bumping versions and updating depricated @UIApplicationMain on AppDelegate.swift to @main. --------- Co-authored-by: Jakob E. Bardram <[email protected]> Co-authored-by: Aamir Farooq <[email protected]> * temporarily removing ACTIVITY_RECOGNITION permission. * bumping version code to 31 * Reintroducing ACTIVITY_RECOGNITION permission * bumping version code to 32 * Checking if health connect exists and redirect user to google play store on Health Connect page. * bumping version to 2.2.1 * removing duplicates from pubspec.lock * conditional check only for android * update to EN and DA text * Update pubspec.lock * language improvements --------- Co-authored-by: Jakob E. Bardram <[email protected]> Co-authored-by: Aamir Farooq <[email protected]>
- Loading branch information
1 parent
aa16144
commit dc2dcc7
Showing
10 changed files
with
299 additions
and
194 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
part of carp_study_app; | ||
|
||
class InstallHealthConnectDialog extends StatelessWidget { | ||
const InstallHealthConnectDialog(BuildContext context, {super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
RPLocalizations locale = RPLocalizations.of(context)!; | ||
return AlertDialog( | ||
titlePadding: const EdgeInsets.symmetric(vertical: 4), | ||
insetPadding: const EdgeInsets.symmetric(vertical: 24, horizontal: 40), | ||
title: const DialogTitle( | ||
title: "pages.about.install_health_connect.title", | ||
), | ||
content: Text( | ||
locale.translate('pages.about.install_health_connect.description'), | ||
style: aboutCardContentStyle, | ||
textAlign: TextAlign.justify, | ||
), | ||
actions: [ | ||
TextButton( | ||
onPressed: () => Navigator.of(context).pop(), | ||
child: Text(locale.translate('cancel')), | ||
), | ||
TextButton( | ||
child: Text(locale.translate('install')), | ||
onPressed: () async { | ||
_redirectToHealthConnectPlayStore(); | ||
Navigator.of(context).pop(); | ||
}, | ||
), | ||
], | ||
); | ||
} | ||
|
||
void _redirectToHealthConnectPlayStore() async { | ||
final Uri url = Uri.parse( | ||
'https://play.google.com/store/apps/details?id=${bloc.healthConnectPackageName}'); | ||
var canLaunch = await canLaunchUrl(url); | ||
if (canLaunch) { | ||
await launchUrl(url); | ||
} else { | ||
throw 'Could not launch $url'; | ||
} | ||
} | ||
} |
Oops, something went wrong.