StyledTextWidgetTag class
The class with which you can specify the widget 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': StyledTextWidgetTag(
TextField(
decoration: InputDecoration(
hintText: 'Input',
),
),
size: Size.fromWidth(200),
constraints: BoxConstraints.tight(Size(100, 50)),
),
},
)
- Inheritance
-
- Object
- StyledTextTagBase
- StyledTextWidgetBuilderTag
- StyledTextWidgetTag
Constructors
- StyledTextWidgetTag(Widget child, {Size? size, String? textContent, BoxConstraints? constraints, PlaceholderAlignment alignment = PlaceholderAlignment.middle, TextBaseline baseline = TextBaseline.alphabetic})
Properties
- alignment → PlaceholderAlignment
-
Aligning the widget relative to the text.
finalinherited
- baseline → TextBaseline?
-
The TextBaseline to align against when using ui.PlaceholderAlignment.baseline,
ui.PlaceholderAlignment.aboveBaseline, and ui.PlaceholderAlignment.belowBaseline.
finalinherited
- builder → StyledTextWidgetBuilderTagCallback
-
Widget builder to insert in place of the tag.
finalinherited
- constraints → BoxConstraints?
-
Additional constraints to apply to the widget.
finalinherited
- 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.
finalinherited
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 -
inherited
-
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