GptMarkdownConfig class

A configuration class for the GPT Markdown component.

The GptMarkdownConfig class is used to configure the GPT Markdown component. It takes a style parameter to set the style of the text, a textDirection parameter to set the direction of the text, and an optional onLinkTab parameter to handle link clicks.

Constructors

GptMarkdownConfig.new({TextStyle? style, TextDirection textDirection = TextDirection.ltr, void onLinkTab(String url, String title)?, TextAlign? textAlign, TextScaler? textScaler, String latexWorkaround(String tex)?, Widget latexBuilder(BuildContext context, String tex, TextStyle textStyle, bool inline)?, bool followLinkColor = false, Widget codeBuilder(BuildContext context, String name, String code, bool closed)?, Widget sourceTagBuilder(BuildContext context, String content, TextStyle textStyle)?, Widget highlightBuilder(BuildContext context, String text, TextStyle style)?, Widget linkBuilder(BuildContext context, String text, String url, TextStyle style)?, Widget imageBuilder(BuildContext, String imageUrl)?, int? maxLines, TextOverflow? overflow})
const

Properties

codeBuilder Widget Function(BuildContext context, String name, String code, bool closed)?
The code builder.
final
followLinkColor bool
Whether to follow the link color.
final
hashCode int
The hash code for this object.
no setterinherited
highlightBuilder Widget Function(BuildContext context, String text, TextStyle style)?
The highlight builder.
final
imageBuilder Widget Function(BuildContext, String imageUrl)?
The image builder.
final
latexBuilder Widget Function(BuildContext context, String tex, TextStyle textStyle, bool inline)?
The LaTeX builder.
final
latexWorkaround String Function(String tex)?
The LaTeX workaround.
final
linkBuilder Widget Function(BuildContext context, String text, String url, TextStyle style)?
final
maxLines int?
The maximum number of lines.
final
onLinkTab → void Function(String url, String title)?
The callback function to handle link clicks.
final
overflow TextOverflow?
The overflow.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceTagBuilder Widget Function(BuildContext context, String content, TextStyle textStyle)?
The source tag builder.
final
style TextStyle?
The style of the text.
final
textAlign TextAlign?
The alignment of the text.
final
textDirection TextDirection
The direction of the text.
final
textScaler TextScaler?
The text scaler.
final

Methods

copyWith({TextStyle? style, TextDirection? textDirection, void onLinkTab(String url, String title)?, TextAlign? textAlign, TextScaler? textScaler, String latexWorkaround(String tex)?, Widget latexBuilder(BuildContext context, String tex, TextStyle textStyle, bool inline)?, Widget sourceTagBuilder(BuildContext context, String content, TextStyle textStyle)?, bool? followLinkColor, Widget codeBuilder(BuildContext context, String name, String code, bool closed)?, int? maxLines, TextOverflow? overflow, Widget highlightBuilder(BuildContext context, String text, TextStyle style)?, Widget linkBuilder(BuildContext context, String text, String url, TextStyle style)?, Widget imageBuilder(BuildContext, String imageUrl)?}) GptMarkdownConfig
A copy of the configuration with the specified parameters.
getRich(InlineSpan span) Text
A method to get a rich text widget from an inline span.
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