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 onLinkTap parameter to handle link clicks.

Constructors

GptMarkdownConfig({TextStyle? style, TextDirection textDirection = TextDirection.ltr, void onLinkTap(String url, String title)?, TextAlign? textAlign, TextScaler? textScaler, String latexWorkaround(String tex)?, LatexBuilder? latexBuilder, bool followLinkColor = false, CodeBlockBuilder? codeBuilder, SourceTagBuilder? sourceTagBuilder, InlineCodeBuilder? inlineCodeBuilder, @Deprecated('Use inlineCodeBuilder. Will be removed in 2.0.0.') HighlightBuilder? highlightBuilder, OrderedListBuilder? orderedListBuilder, UnOrderedListBuilder? unOrderedListBuilder, LinkBuilder? linkBuilder, ImageBuilder? imageBuilder, int? maxLines, TextOverflow? overflow, List<MarkdownComponent>? components, List<MarkdownComponent>? inlineComponents, List<InlinePattern>? inlinePatterns, TableBuilder? tableBuilder, InlineCodeStyle? inlineCodeStyle, GptMarkdownStyleSheet? styleSheet, BlockQuoteBuilder? blockQuoteBuilder, HeadingBuilder? headingBuilder, CheckboxBuilder? checkboxBuilder, RadioOptionBuilder? radioOptionBuilder, HrBuilder? hrBuilder, void onCheckboxChanged(bool value)?, void onCodeCopy(String code)?, void onImageTap(String code)?, void onSourceTagTap(String code)?, bool autolink = true, Set<String> autolinkSchemes = const <String>{}, MarkdownScope scope = MarkdownScope.content})
const

Properties

Whether bare URLs, www. hosts, emails and <...> autolinks are linked.
final
autolinkSchemes Set<String>
Extra URL schemes linked without <>. See GptMarkdown.autolinkSchemes.
final
blockQuoteBuilder BlockQuoteBuilder?
Replaces the whole blockquote widget.
final
checkboxBuilder CheckboxBuilder?
Replaces the whole checkbox row.
final
codeBuilder CodeBlockBuilder?
The code builder.
final
components List<MarkdownComponent>?
The list of components.
final
followLinkColor bool
Whether to follow the link color.
final
hashCode int
The hash code for this object.
no setterinherited
headingBuilder HeadingBuilder?
Replaces the whole heading widget.
final
highlightBuilder HighlightBuilder?
Builds a widget for inline `code`.
final
hrBuilder HrBuilder?
Replaces the horizontal rule.
final
imageBuilder ImageBuilder?
The image builder.
final
inlineCodeBuilder InlineCodeBuilder?
Builds the span for inline `code`, overriding the default chip.
final
inlineCodeStyle InlineCodeStyle?
Overrides the themed inline code style for this widget only.
final
inlineComponents List<MarkdownComponent>?
The list of inline components.
final
inlinePatterns List<InlinePattern>?
App-specific inline syntaxes. See GptMarkdown.inlinePatterns.
final
latexBuilder LatexBuilder?
The LaTeX builder.
final
latexWorkaround String Function(String tex)?
The LaTeX workaround.
final
linkBuilder LinkBuilder?
The link builder.
final
maxLines int?
The maximum number of lines.
final
onCheckboxChanged → void Function(bool value)?
Called when a task-list checkbox is tapped.
final
onCodeCopy → void Function(String code)?
Called with the code after a code block's copy button is used.
final
onImageTap → void Function(String code)?
Called with the image URL when an image is tapped.
final
onLinkTap → void Function(String url, String title)?
The callback function to handle link clicks.
final
onSourceTagTap → void Function(String code)?
Called with the tag content when a [1] citation chip is tapped.
final
orderedListBuilder OrderedListBuilder?
The Ordered List builder.
final
overflow TextOverflow?
The overflow.
final
radioOptionBuilder CheckboxBuilder?
Replaces the whole radio row.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope MarkdownScope
The nesting context the current text is being rendered in.
final
sourceTagBuilder HighlightBuilder?
The source tag builder.
final
style TextStyle?
The style of the text.
final
styleSheet GptMarkdownStyleSheet?
Per-component appearance for this widget. See GptMarkdown.styleSheet.
final
tableBuilder TableBuilder?
The table builder.
final
textAlign TextAlign?
The alignment of the text.
final
textDirection TextDirection
The direction of the text.
final
textScaler TextScaler?
The text scaler.
final
unOrderedListBuilder UnOrderedListBuilder?
The Unordered List builder.
final

Methods

copyWith({TextStyle? style, TextDirection? textDirection, void onLinkTap(String url, String title)?, TextAlign? textAlign, TextScaler? textScaler, String latexWorkaround(String tex)?, LatexBuilder? latexBuilder, SourceTagBuilder? sourceTagBuilder, bool? followLinkColor, CodeBlockBuilder? codeBuilder, int? maxLines, TextOverflow? overflow, InlineCodeBuilder? inlineCodeBuilder, HighlightBuilder? highlightBuilder, LinkBuilder? linkBuilder, ImageBuilder? imageBuilder, OrderedListBuilder? orderedListBuilder, UnOrderedListBuilder? unOrderedListBuilder, List<MarkdownComponent>? components, List<MarkdownComponent>? inlineComponents, List<InlinePattern>? inlinePatterns, TableBuilder? tableBuilder, InlineCodeStyle? inlineCodeStyle, GptMarkdownStyleSheet? styleSheet, BlockQuoteBuilder? blockQuoteBuilder, HeadingBuilder? headingBuilder, CheckboxBuilder? checkboxBuilder, RadioOptionBuilder? radioOptionBuilder, HrBuilder? hrBuilder, void onCheckboxChanged(bool value)?, void onCodeCopy(String code)?, void onImageTap(String code)?, void onSourceTagTap(String code)?, bool? autolink, Set<String>? autolinkSchemes, MarkdownScope? scope}) GptMarkdownConfig
A copy of the configuration with the specified parameters.
getRich(InlineSpan span, {bool isRoot = false}) Widget
A method to get a rich text widget from an inline span.
isSame(GptMarkdownConfig other) bool
A method to check if the configuration is the same.
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