StyledTextWidgetBuilderTag class

A class in which you can specify the widget builder to insert in place of the tag.

In the example below, an input field is inserted in place of the tag:

StyledText(
  text: 'Text with <input/> inside.',
  tags: {
    'input': StyledTextWidgetBuilderTag(
      (context, attributes) => TextField(
        decoration: InputDecoration(
          hintText: 'Input',
        ),
      ),
      size: Size.fromWidth(200),
      constraints: BoxConstraints.tight(Size(100, 50)),
    ),
  },
)
Inheritance
Implementers

Constructors

StyledTextWidgetBuilderTag(StyledTextWidgetBuilderTagCallback builder, {Size? size, BoxConstraints? constraints, PlaceholderAlignment alignment = PlaceholderAlignment.middle, TextBaseline? baseline = TextBaseline.alphabetic})

Properties

alignment PlaceholderAlignment
Aligning the widget relative to the text.
final
baseline TextBaseline?
The TextBaseline to align against when using ui.PlaceholderAlignment.baseline, ui.PlaceholderAlignment.aboveBaseline, and ui.PlaceholderAlignment.belowBaseline.
final
builder StyledTextWidgetBuilderTagCallback
Widget builder to insert in place of the tag.
final
constraints BoxConstraints?
Additional constraints to apply to the widget.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size?
The size of the available space for the widget, if not specified, the widget will take up all the available space.
final

Methods

createRecognizer(String? text, Map<String?, String?> attributes) GestureRecognizer?
inherited
createSpan({required BuildContext context, String? text, String? textContent, List<InlineSpan>? children, required Map<String?, String?> attributes, GestureRecognizer? recognizer}) InlineSpan
override
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