refactor(ui): Remove unnecessary GestureDetector from the service_page

pull/461/head
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),
const SizedBox(height: 16),
if (service.url != null)
GestureDetector(
ListTile(
iconColor: Theme.of(context).colorScheme.onBackground,
onTap: () => launchURL(service.url),
onLongPress: () {
PlatformAdapter.setClipboard(service.url!);
getIt<NavigationService>()
.showSnackBar('basis.copied_to_clipboard'.tr());
},
child: ListTile(
iconColor: Theme.of(context).colorScheme.onBackground,
onTap: () => launchURL(service.url),
leading: const Icon(Icons.open_in_browser),
title: Text(
'service_page.open_in_browser'.tr(),
style: Theme.of(context).textTheme.titleMedium,
),
subtitle: Text(
service.url!.replaceAll('https://', ''),
style: Theme.of(context).textTheme.bodyMedium,
),
leading: const Icon(Icons.open_in_browser),
title: Text(
'service_page.open_in_browser'.tr(),
style: Theme.of(context).textTheme.titleMedium,
),
subtitle: Text(
service.url!.replaceAll('https://', ''),
style: Theme.of(context).textTheme.bodyMedium,
),
),
const SizedBox(height: 8),