MarkdownRichText class
A widget that renders a MarkdownTextSpan as rich text with optional styling and interaction.
This widget allows for custom Markdown styling, theming, and tap handling.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MarkdownRichText
Constructors
- MarkdownRichText(InlineSpan textSpan, {MarkdownSettings settings = const MarkdownSettings(), MarkdownStyleSheet? styleSheet, MarkdownStyleSheetBaseTheme styleSheetTheme = MarkdownStyleSheetBaseTheme.material, void onLinkTap(String)?, Widget imageBuilder(MarkdownImageConfig)?, String? imageDirectory, StrutStyle? strutStyle, TextAlign textAlign = TextAlign.left, TextDirection? textDirection, TextOverflow? overflow, TextScaler? textScaler, int? maxLines, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, Color? selectionColor, Key? key})
-
Creates a
MarkdownRichTextwidget.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageBuilder → Widget Function(MarkdownImageConfig)?
-
A custom builder for rendering the image widget.
final
- imageDirectory → String?
-
The base directory holding images referenced by Img tags with local or network file paths.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxLines → int?
-
The maximum number of lines to display before truncating.
final
- onLinkTap → void Function(String)?
-
Callback invoked when a link is tapped, with the link's URL string.
final
- overflow → TextOverflow?
-
The overflow strategy for text that exceeds the available space.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
The color to use for text selection highlights.
final
- semanticsIdentifier → String?
-
A unique identifier for the semantics node for this widget.
final
- semanticsLabel → String?
-
An alternative semantics label for this text.
final
- settings → MarkdownSettings
-
The Markdown parser settings.
final
- strutStyle → StrutStyle?
-
Optional
StrutStylefor text layout.final - styleSheet → MarkdownStyleSheet?
-
Optional custom
MarkdownStyleSheetto merge with default styles.final - styleSheetTheme → MarkdownStyleSheetBaseTheme
-
The base theme to use for the
MarkdownStyleSheet.final - textAlign → TextAlign
-
How the text should be aligned horizontally.
final
- textDirection → TextDirection?
-
The text direction to use for rendering.
final
- textHeightBehavior → TextHeightBehavior?
-
The strategy to use for determining the height of the text.
final
- textScaler → TextScaler?
-
The
TextScalerto use for scaling text.final - textSpan → InlineSpan
-
The text to display as a
InlineSpan.final - textWidthBasis → TextWidthBasis?
-
The strategy to use for determining the width of the text.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MarkdownRichText> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited