AssistMessageSettings class

Represents the settings for the assist bubble.

The AssistBubbleSettings class used to store a customization details of request and response bubble and it's elements, that control the appearance and behavior of the assist bubble.

Example:

@override
Widget build(BuildContext context) {
  return SfAIAssistView(
    requestMessageSettings: const AssistBubbleSettings(
      showAuthorName: true,
      showTimestamp: true,
      showAuthorAvatar: true,
      widthFactor: 0.5,
      avatarSize: Size.square(40.0),
      margin: EdgeInsets.all(2.0),
      padding:
          EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
      headerPadding:
          EdgeInsetsDirectional.only(top: 10.0, bottom: 14.0),
      footerPadding: EdgeInsetsDirectional.only(top: 14.0),
    ),
    responseMessageSettings: const AssistBubbleSettings(
      showAuthorName: true,
      showTimestamp: true,
      showAuthorAvatar: true,
      widthFactor: 0.9,
      avatarSize: Size.square(24.0),
      margin: EdgeInsets.all(2.0),
      padding:
          EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
      headerPadding: EdgeInsetsDirectional.only(bottom: 10.0),
      footerPadding: EdgeInsetsDirectional.only(top: 10.0),
    ),
  );
}

Constructors

AssistMessageSettings.new({bool showAuthorName = false, bool showTimestamp = false, bool? showAuthorAvatar, DateFormat? timestampFormat, TextStyle? textStyle, TextStyle? headerTextStyle, Color? backgroundColor, ShapeBorder? shape, double widthFactor = 0.8, Size avatarSize = const Size.square(32.0), EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? avatarPadding, EdgeInsetsGeometry headerPadding = const EdgeInsetsDirectional.only(bottom: 3.0), EdgeInsetsGeometry footerPadding = const EdgeInsetsDirectional.only(top: 4.0)})
const

Properties

avatarPadding EdgeInsetsGeometry?
Determine the padding around the avatar.
final
avatarSize Size
Size of the avatar.
final
backgroundColor Color?
Used to set background color for the request and response bubble content.
final
footerPadding EdgeInsetsGeometry
Padding for the footer.
final
hashCode int
The hash code for this object.
no setterinherited
headerPadding EdgeInsetsGeometry
Padding for the header.
final
headerTextStyle TextStyle?
Text style for the header.
final
margin EdgeInsetsGeometry?
Determine margin around the bubble.
final
padding EdgeInsetsGeometry?
It determines a padding around the content with in the message bubble.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder?
To set the custom shape of the request and response bubble.
final
showAuthorAvatar bool?
The showAuthorAvatar property is to determines whether the user avatar is displayed or not.
final
showAuthorName bool
The showAuthorName property is to determines whether the user name is displayed or not.
final
showTimestamp bool
The showTimestamp property is to determines whether the time stamp is displayed or not.
final
textStyle TextStyle?
Text style for the request and response.
final
timestampFormat → DateFormat?
The timestampFormat property specifies the format used for displaying timestamps.
final
widthFactor double
The widthFactor property specifies the proportional width of a bubble.
final

Methods

copyWith({bool? showAuthorName, bool? showTimestamp, bool? showAuthorAvatar, DateFormat? timestampFormat, TextStyle? textStyle, TextStyle? headerTextStyle, Color? backgroundColor, ShapeBorder? shape, double? widthFactor, Size? avatarSize, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? avatarPadding, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? footerPadding}) AssistMessageSettings
Creates a copy of this bubble settings with the given fields replaced by the new values.
mergeWith(AssistMessageSettings settings) AssistMessageSettings
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