diff --git a/lib/screens/about_screen.dart b/lib/screens/about_screen.dart index 7dcaaf6..e908c82 100644 --- a/lib/screens/about_screen.dart +++ b/lib/screens/about_screen.dart @@ -13,6 +13,7 @@ class AboutScreen extends StatefulWidget { class _AboutScreenState extends State { static const _supportEmail = 'support@car64.app'; + static const _websiteUrl = 'https://www.car64.app/'; PackageInfo? _packageInfo; @@ -46,6 +47,18 @@ class _AboutScreenState extends State { } } + Future _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 { ), 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(