Add ripple effect to text-copy action

Generally the use of GestureDetector is discouraged in favor of InkWell
unless you have a very specific reason to use it. InkWells automatically
generate ripple effects if there is a parent material widget in the tree
to indicate to a user that a given widget is interactible.
This commit is contained in:
Nutcake 2023-11-11 10:51:24 +01:00
parent 7ff98649e9
commit 44e94555f2

View file

@ -12,7 +12,8 @@ class MessageText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
return InkWell(
borderRadius: BorderRadius.circular(16),
onLongPress: () async {
await Clipboard.setData(ClipboardData(text: message.content));
if (context.mounted) {