From 344f4f706f31987d31df76b0218e78bd687c737e Mon Sep 17 00:00:00 2001 From: problematicconsumer Date: Sun, 12 Nov 2023 13:08:48 +0330 Subject: [PATCH] Add proxy tag dialog --- lib/features/proxies/widgets/proxy_tile.dart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/features/proxies/widgets/proxy_tile.dart b/lib/features/proxies/widgets/proxy_tile.dart index fe2a2375..180afc42 100644 --- a/lib/features/proxies/widgets/proxy_tile.dart +++ b/lib/features/proxies/widgets/proxy_tile.dart @@ -1,8 +1,9 @@ import 'package:flutter/material.dart'; import 'package:hiddify/domain/singbox/singbox.dart'; +import 'package:hiddify/utils/custom_loggers.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -class ProxyTile extends HookConsumerWidget { +class ProxyTile extends HookConsumerWidget with PresLogger { const ProxyTile( this.proxy, { super.key, @@ -56,6 +57,20 @@ class ProxyTile extends HookConsumerWidget { : null, selected: selected, onTap: onSelect, + onLongPress: () async { + showDialog( + context: context, + builder: (context) => AlertDialog( + content: SelectionArea(child: Text(sanitizedTag(proxy.tag))), + actions: [ + TextButton( + onPressed: Navigator.of(context).pop, + child: Text(MaterialLocalizations.of(context).closeButtonLabel), + ), + ], + ), + ); + }, horizontalTitleGap: 4, ); }