From 34ff5c05ecc7fd2cc9566fafa79be019a9330e8a Mon Sep 17 00:00:00 2001 From: otsmr Date: Mon, 10 Feb 2025 20:29:00 +0100 Subject: [PATCH] make text selectable #10 --- lib/src/components/format_long_string.dart | 2 +- lib/src/views/chats/chat_item_details_view.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/components/format_long_string.dart b/lib/src/components/format_long_string.dart index 7b90904..c8911bf 100644 --- a/lib/src/components/format_long_string.dart +++ b/lib/src/components/format_long_string.dart @@ -28,7 +28,7 @@ class FormattedStringWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Text( + return SelectableText( formatString(longString), style: TextStyle(fontSize: 18, color: Colors.black), textAlign: TextAlign.center, diff --git a/lib/src/views/chats/chat_item_details_view.dart b/lib/src/views/chats/chat_item_details_view.dart index 16b19de..7abf2fd 100644 --- a/lib/src/views/chats/chat_item_details_view.dart +++ b/lib/src/views/chats/chat_item_details_view.dart @@ -57,7 +57,7 @@ class ChatListEntry extends StatelessWidget { 83, 68, 137, 255), // Set the background color borderRadius: BorderRadius.circular(12.0), // Set border radius ), - child: Text( + child: SelectableText( content.text, style: TextStyle( color: Colors.white, // Set text color for contrast