MessageOptions class
Options for customizing message appearance and behavior
Constructors
- MessageOptions({TextStyle? textStyle, EdgeInsets? padding, EdgeInsets? containerMargin, BoxDecoration? decoration, BoxDecoration? containerDecoration, Color? containerColor, bool showTime = true, TextStyle? timeTextStyle, String timeFormat(DateTime)?, double? timestampSpacing, int maxReactions = 5, double reactionSize = 24.0, bool enableQuickReply = true, BubbleStyle? bubbleStyle, bool? showUserName = true, TextStyle? userNameStyle, bool? showCopyButton = false, void onCopy(String)?, Color? userTextColor, Color? aiTextColor, void onMediaTap(ChatMedia)?, bool enableImageTaps = false, void onImageTap(String url, String? title, String? alt)?, Widget customBubbleBuilder(BuildContext, ChatMessage, bool)?, Widget? aiAvatar})
-
Creates an instance of MessageOptions.
const
Properties
- aiAvatar → Widget?
-
final
- aiTextColor → Color?
-
Color for AI message text
final
- bubbleStyle → BubbleStyle?
-
Style options for message bubbles
final
- containerColor → Color?
-
Color for the message bubble background
final
- containerDecoration → BoxDecoration?
-
Decoration for the message bubble (containerDecoration is the new name)
final
- containerMargin → EdgeInsets?
-
Margin around the message bubble
final
- customBubbleBuilder → Widget Function(BuildContext, ChatMessage, bool)?
-
Custom builder for message bubbles
final
- decoration → BoxDecoration?
-
Decoration for the message bubble
final
- effectiveDecoration → BoxDecoration?
-
Get effective decoration with fallback to containerColor
no setter
- enableImageTaps → bool
-
Whether to enable tapping on images in markdown content
final
- enableQuickReply → bool
-
Whether to enable quick replies
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxReactions → int
-
Maximum number of reactions to show
final
- onCopy → void Function(String)?
-
Callback when message is copied
final
- onImageTap → void Function(String url, String? title, String? alt)?
-
Callback when an image in markdown content is tapped
Provides the image URL, title, and alt text
final
- onMediaTap → void Function(ChatMedia)?
-
Callback when media is tapped in a message
final
- padding → EdgeInsets?
-
Padding around the message bubble
final
- reactionSize → double
-
Size of reaction bubbles
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showCopyButton → bool?
-
Whether to show copy button for AI messages
final
- showTime → bool
-
Whether to show message timestamp
final
- showUserName → bool?
-
Whether to show user name
final
- textStyle → TextStyle?
-
Style for the message text
final
- timeFormat → String Function(DateTime)?
-
Function to format the timestamp
final
- timestampSpacing → double?
-
Spacing between message bubble and timestamp
final
- timeTextStyle → TextStyle?
-
Style for the timestamp text
final
- userNameStyle → TextStyle?
-
Style for user names
final
- userTextColor → Color?
-
Color for user message text
final
Methods
-
copyWith(
{TextStyle? textStyle, EdgeInsets? padding, EdgeInsets? containerMargin, BoxDecoration? decoration, BoxDecoration? containerDecoration, Color? containerColor, bool? showTime, TextStyle? timeTextStyle, String timeFormat(DateTime)?, double? timestampSpacing, int? maxReactions, double? reactionSize, bool? enableQuickReply, BubbleStyle? bubbleStyle, bool? showUserName, TextStyle? userNameStyle, bool? showCopyButton, void onCopy(String)?, Color? userTextColor, Color? aiTextColor, void onMediaTap(ChatMedia)?, bool? enableImageTaps, void onImageTap(String url, String? title, String? alt)?, Widget customBubbleBuilder(BuildContext, ChatMessage, bool)?}) → MessageOptions -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited