File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/flyer_chat_text_message/lib/src Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ class FlyerChatTextMessage extends StatelessWidget {
123123 /// The widget to display on top of the message.
124124 final Widget ? topWidget;
125125
126+ /// Widget to display as text, overriding message text.
127+ final Widget ? customWidget;
128+
126129 /// Creates a widget to display a text message.
127130 const FlyerChatTextMessage ({
128131 super .key,
@@ -149,6 +152,7 @@ class FlyerChatTextMessage extends StatelessWidget {
149152 this .onLinkTap,
150153 this .linkPreviewPosition = LinkPreviewPosition .bottom,
151154 this .topWidget,
155+ this .customWidget,
152156 });
153157
154158 bool get _isOnlyEmoji => message.metadata? ['isOnlyEmoji' ] == true ;
@@ -188,7 +192,7 @@ class FlyerChatTextMessage extends StatelessWidget {
188192 )
189193 : null ;
190194
191- final textContent = GptMarkdownTheme (
195+ final textContent = customWidget ?? GptMarkdownTheme (
192196 gptThemeData: GptMarkdownTheme .of (context),
193197 child: GptMarkdown (
194198 message.text,
You can’t perform that action at this time.
0 commit comments