FlintRichText class

A widget that allows rendering of rich, styled inline text spans.

Similar to Flutter's RichText, but built for Flint UI’s multi-render system (HTML, text, and JSON). This widget is useful for composing formatted text blocks with mixed styles, links, or emphasis in email templates, web components, and text-based outputs.

Inheritance

Constructors

FlintRichText({required List<FlintTextSpan> children, TextAlign align = TextAlign.left})
Creates a rich text widget with one or more FlintTextSpans.

Properties

align TextAlign
The horizontal alignment of the entire text block.
final
children List<FlintTextSpan>
A list of text spans that define the formatted content.
final
hashCode int
The hash code for this object.
no setterinherited
id String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
script FlintScript?
finalinherited

Methods

buildTemplate() FlintWidget
For rich text, returns the current widget since it's a leaf renderer.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renderScriptAttributes() String
Render attached script to HTML attributes
inherited
toHtml() String
Converts the rich text and all its spans into an HTML representation.
override
toJson() Map<String, dynamic>
Serializes the rich text widget into a JSON-compatible map, useful for dynamic rendering or API output.
override
toString() String
A string representation of this object.
inherited
toText() String
Converts the rich text to a plain text version for environments that do not support HTML (e.g., console output or text-only emails).
override

Operators

operator ==(Object other) bool
The equality operator.
inherited