From 6ab2ed82eaa6ea82fde76aae2af04b011d62c767 Mon Sep 17 00:00:00 2001 From: Foti Dim Date: Wed, 11 Feb 2026 17:20:21 +0100 Subject: [PATCH] Update About dialog --- example/lib/home/widgets/drawer.dart | 104 ++++++++++++++------------- 1 file changed, 55 insertions(+), 49 deletions(-) diff --git a/example/lib/home/widgets/drawer.dart b/example/lib/home/widgets/drawer.dart index a5d8bc5..2d69bd2 100644 --- a/example/lib/home/widgets/drawer.dart +++ b/example/lib/home/widgets/drawer.dart @@ -134,59 +134,65 @@ class _AppDrawerState extends State { ), FutureBuilder( future: PackageInfo.fromPlatform(), - builder: (_, snapshot) => AboutListTile( - icon: const Icon(Icons.info_outline), - applicationIcon: - Image.asset('assets/icon.png', width: 40, height: 40), - applicationName: 'Universal BLE', - applicationVersion: - "${snapshot.data?.version} (${snapshot.data?.buildNumber})", - applicationLegalese: '\u{a9} 2023 Navideck', - aboutBoxChildren: [ - const SizedBox(height: 24), - RichText( - textAlign: TextAlign.justify, - text: TextSpan( - children: [ - TextSpan(text: "Universal BLE is "), - TextSpan( - text: 'open source', - style: const TextStyle( - color: Colors.blue, - decoration: TextDecoration.underline, + builder: (_, snapshot) { + final theme = Theme.of(context); + final bodyStyle = theme.textTheme.bodyMedium?.copyWith( + color: theme.colorScheme.onSurface, + ) ?? TextStyle(color: theme.colorScheme.onSurface); + final linkStyle = bodyStyle.copyWith( + color: theme.colorScheme.primary, + decoration: TextDecoration.underline, + ); + return AboutListTile( + icon: const Icon(Icons.info_outline), + applicationIcon: + Image.asset('assets/icon.png', width: 40, height: 40), + applicationName: 'Universal BLE', + applicationVersion: + "${snapshot.data?.version} (${snapshot.data?.buildNumber})", + applicationLegalese: '\u{a9} 2023 Navideck', + aboutBoxChildren: [ + const SizedBox(height: 24), + RichText( + textAlign: TextAlign.justify, + text: TextSpan( + style: bodyStyle, + children: [ + const TextSpan(text: "Universal BLE is "), + TextSpan( + text: 'open source', + style: linkStyle, + recognizer: TapGestureRecognizer() + ..onTap = () { + launchUrl(Uri.parse( + "https://github.com/Navideck/Universal-BLE")); + }, ), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl(Uri.parse( - "https://github.com/Navideck/universal_ble")); - }, - ), - TextSpan(text: "."), - ], + const TextSpan(text: "."), + ], + ), ), - ), - const SizedBox(height: 24), - RichText( - textAlign: TextAlign.justify, - text: TextSpan( - children: [ - TextSpan(text: "Need help with your project? "), - TextSpan( - text: 'Hire us', - style: const TextStyle( - color: Colors.blue, - decoration: TextDecoration.underline, + const SizedBox(height: 24), + RichText( + textAlign: TextAlign.justify, + text: TextSpan( + style: bodyStyle, + children: [ + const TextSpan(text: "Need help with your project? "), + TextSpan( + text: 'Hire us', + style: linkStyle, + recognizer: TapGestureRecognizer() + ..onTap = () { + launchUrl(Uri.parse('https://navideck.com/contact')); + }, ), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl(Uri.parse('mailto:info@navideck.com')); - }, - ), - ], + ], + ), ), - ), - ], - ), + ], + ); + }, ), ], ),