Skip to content

Commit

Permalink
Add privacy policy link back to homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
a-mabe committed Sep 27, 2024
1 parent 82b3adc commit 3256b5e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions lib/pages/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import 'package:openhiit/widgets/loader.dart';
import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart';
import 'package:sqflite/sqflite.dart';
import 'package:url_launcher/url_launcher.dart';

// Global flag to indicate if exporting is in progress
bool exporting = false;
Expand Down Expand Up @@ -369,6 +370,43 @@ class _MyHomePageState extends State<MyHomePage> {
color: Theme.of(context).scaffoldBackgroundColor,
child: SafeArea(
child: Scaffold(
appBar: AppBar(
toolbarHeight: 30,
actions: [
IconButton(
icon: const Icon(Icons.info_outline),
onPressed: () {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: const Text("About OpenHIIT"),
content: const Text(
"OpenHIIT is a free and open-source interval timer."),
actions: [
TextButton(
onPressed: () async {
final Uri url = Uri.parse(
'https://a-mabe.github.io/OpenHIIT/');
if (!await launchUrl(url)) {
throw Exception('Could not launch $url');
}
},
child: const Text("View privacy policy"),
),
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text("Close"),
),
],
);
});
},
),
],
),

/// Pushes to [SelectTimer()]
floatingActionButton: Visibility(
Expand Down

0 comments on commit 3256b5e

Please sign in to comment.