FluentMarkupSpan class final

A markup tag wrapping zero or more child spans.

Tag names are translator-defined: <bold>, <a>, <icon> — anything the developer mapped to a widget at the call site. The runtime doesn't validate tag names; unknown tags are passed through to the consumer's tag-to-widget mapping (fluent_flutter's converter renders an unmapped tag's children unstyled and asserts in debug builds so translator typos surface during development).

tag is always lowercase — the underlying HTML5 parser case-folds tag names per spec, so <Bold>, <BOLD>, and <bold> all produce tag = "bold".

const span = FluentMarkupSpan(
  tag: 'a',
  attrs: {'href': '/help'},
  children: [FluentTextSpan('our help')],
);
Inheritance

Constructors

FluentMarkupSpan({required String tag, Map<String, String> attrs = const {}, List<FluentSpan> children = const []})
Bundles the element's tag, attributes, and children.
const

Properties

attrs Map<String, String>
Attributes parsed from the opening tag.
final
children List<FluentSpan>
The contents between <tag> and </tag>.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag String
The tag name from the source — lowercase, no angle brackets.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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