From 72959c6a2ff21177da529daccc2173085ec28a3f Mon Sep 17 00:00:00 2001 From: 2paperstar Date: Thu, 6 Nov 2025 22:12:16 +0900 Subject: [PATCH] feat: make chat text selectable --- lib/app/modules/chat/presentation/widgets/chat_bubble.dart | 2 +- lib/app/modules/chat/presentation/widgets/fofo_bubble.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/app/modules/chat/presentation/widgets/chat_bubble.dart b/lib/app/modules/chat/presentation/widgets/chat_bubble.dart index 5e5b0876..572cf3e1 100644 --- a/lib/app/modules/chat/presentation/widgets/chat_bubble.dart +++ b/lib/app/modules/chat/presentation/widgets/chat_bubble.dart @@ -32,7 +32,7 @@ class ChatBubble extends StatelessWidget { ? null : PotProfileImage(user: user!, pot: pot), name: user?.name, - child: Text( + child: SelectableText( message, style: TextStyles.description.copyWith( color: user == null ? Palette.primaryLight : Palette.textGrey, diff --git a/lib/app/modules/chat/presentation/widgets/fofo_bubble.dart b/lib/app/modules/chat/presentation/widgets/fofo_bubble.dart index b5a4c1c5..d3796fce 100644 --- a/lib/app/modules/chat/presentation/widgets/fofo_bubble.dart +++ b/lib/app/modules/chat/presentation/widgets/fofo_bubble.dart @@ -53,12 +53,12 @@ class FofoBubble extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text( + SelectableText( message.content.split('\n').first.replaceAll('**', '').trim(), style: TextStyles.title4.copyWith(color: Palette.textGrey), ), const SizedBox(height: 8), - Text( + SelectableText( message.content.split('\n').sublist(1).join('\n').trim(), style: TextStyles.description.copyWith(color: Palette.textGrey), ),