refactor(ui): Remove unnecessary GestureDetector from the service_page

This commit is contained in:
Inex Code 2024-04-11 13:13:38 +03:00
parent f81eb6ae32
commit e5b0b38b50
1 changed files with 11 additions and 13 deletions

View File

@ -64,24 +64,22 @@ class _ServicePageState extends State<ServicePage> {
ServiceStatusCard(status: service.status), ServiceStatusCard(status: service.status),
const SizedBox(height: 16), const SizedBox(height: 16),
if (service.url != null) if (service.url != null)
GestureDetector( ListTile(
iconColor: Theme.of(context).colorScheme.onBackground,
onTap: () => launchURL(service.url),
onLongPress: () { onLongPress: () {
PlatformAdapter.setClipboard(service.url!); PlatformAdapter.setClipboard(service.url!);
getIt<NavigationService>() getIt<NavigationService>()
.showSnackBar('basis.copied_to_clipboard'.tr()); .showSnackBar('basis.copied_to_clipboard'.tr());
}, },
child: ListTile( leading: const Icon(Icons.open_in_browser),
iconColor: Theme.of(context).colorScheme.onBackground, title: Text(
onTap: () => launchURL(service.url), 'service_page.open_in_browser'.tr(),
leading: const Icon(Icons.open_in_browser), style: Theme.of(context).textTheme.titleMedium,
title: Text( ),
'service_page.open_in_browser'.tr(), subtitle: Text(
style: Theme.of(context).textTheme.titleMedium, service.url!.replaceAll('https://', ''),
), style: Theme.of(context).textTheme.bodyMedium,
subtitle: Text(
service.url!.replaceAll('https://', ''),
style: Theme.of(context).textTheme.bodyMedium,
),
), ),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),