feat(about): add website link to car64.app

This commit is contained in:
Lukas Müllner 2026-03-09 20:42:28 +01:00
parent de9beb889b
commit 1aae0520c2

View file

@ -13,6 +13,7 @@ class AboutScreen extends StatefulWidget {
class _AboutScreenState extends State<AboutScreen> {
static const _supportEmail = 'support@car64.app';
static const _websiteUrl = 'https://www.car64.app/';
PackageInfo? _packageInfo;
@ -46,6 +47,18 @@ class _AboutScreenState extends State<AboutScreen> {
}
}
Future<void> _openWebsite() async {
final uri = Uri.parse(_websiteUrl);
final launched = await launchUrl(uri, mode: LaunchMode.externalApplication);
if (!launched && mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Could not open website. Please visit https://www.car64.app/'),
),
);
}
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
@ -139,6 +152,16 @@ class _AboutScreenState extends State<AboutScreen> {
),
const SizedBox(height: 20),
SizedBox(
width: double.infinity,
child: OutlinedButton.icon(
onPressed: _openWebsite,
icon: const Icon(Icons.language),
label: const Text('Visit Website'),
),
),
const SizedBox(height: 10),
SizedBox(
width: double.infinity,
child: OutlinedButton.icon(