mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 00:51:20 +00:00
feat: add copy link to service page (#461)
closes #452 Co-authored-by: Inex Code <inex.code@selfprivacy.org> Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/461 Co-authored-by: def <dettlaff@riseup.net> Co-committed-by: def <dettlaff@riseup.net>
This commit is contained in:
parent
0dc281a4f6
commit
add2366e6b
|
@ -2,6 +2,7 @@ import 'package:auto_route/auto_route.dart';
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:selfprivacy/config/get_it_config.dart';
|
||||
import 'package:selfprivacy/logic/bloc/services/services_bloc.dart';
|
||||
import 'package:selfprivacy/logic/bloc/volumes/volumes_bloc.dart';
|
||||
import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart';
|
||||
|
@ -11,6 +12,7 @@ import 'package:selfprivacy/ui/components/cards/filled_card.dart';
|
|||
import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart';
|
||||
import 'package:selfprivacy/ui/router/router.dart';
|
||||
import 'package:selfprivacy/utils/launch_url.dart';
|
||||
import 'package:selfprivacy/utils/platform_adapter.dart';
|
||||
|
||||
@RoutePage()
|
||||
class ServicePage extends StatefulWidget {
|
||||
|
@ -65,6 +67,11 @@ class _ServicePageState extends State<ServicePage> {
|
|||
ListTile(
|
||||
iconColor: Theme.of(context).colorScheme.onBackground,
|
||||
onTap: () => launchURL(service.url),
|
||||
onLongPress: () {
|
||||
PlatformAdapter.setClipboard(service.url!);
|
||||
getIt<NavigationService>()
|
||||
.showSnackBar('basis.copied_to_clipboard'.tr());
|
||||
},
|
||||
leading: const Icon(Icons.open_in_browser),
|
||||
title: Text(
|
||||
'service_page.open_in_browser'.tr(),
|
||||
|
|
Loading…
Reference in a new issue