LinkTextItem class

A kind of TextGroupItem, which wraps given text and link style to TextSpan or WidgetSpan, and uses it as TextGroup's texts.

Inheritance

Constructors

LinkTextItem({required String text, required dynamic onTap(), TextStyle? basicStyle, Color? normalColor, Color? pressedColor, bool? showUnderline = true, WidgetSpan wrapperBuilder(BuildContext context, Widget t, bool tapped)?})
const
LinkTextItem.style({required String text, required dynamic onTap(), TextStyle? normalStyle, TextStyle? pressedStyle, WidgetSpan wrapperBuilder(BuildContext context, Widget t, bool tapped)?})
const

Properties

basicStyle TextStyle?
The link basic style of this item. Note that this value will have no effect when normalStyle or pressedStyle is not null.
final
hashCode int
The hash code for this object.
no setterinherited
normalColor Color?
The link color when this item is not pressed. Note that this value will have no effect when normalStyle or pressedStyle is not null.
final
normalStyle TextStyle?
The text style when this item is not pressed.
final
onTap → dynamic Function()
The behavior when the link is pressed.
final
pressedColor Color?
The link color when this item is pressed down. Note that this value will have no effect when normalStyle or pressedStyle is not null.
final
pressedStyle TextStyle?
The text style when this item is pressed down.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showUnderline bool?
The switcher to show link underline, defaults to true. Note that this value will have no effect when normalStyle or pressedStyle is not null.
final
text String
The link content of this item.
final
wrapperBuilder → (WidgetSpan Function(BuildContext context, Widget t, bool tapped)?)
The WidgetSpan wrapper builder. If this value is set, than returned WidgetSpan will be used as TextGroup's texts.
final

Methods

buildSpan(BuildContext context) InlineSpan
Builds InlineSpan for LinkTextItem, but actually this function is just a dummy. buildSpanForLinkText should be used for building InlineSpan.
override
buildSpanForLinkText(BuildContext context, bool tappedGetter(), dynamic tappedSetter(bool)) InlineSpan
Builds InlineSpan, or said TextSpan or WidgetSpan, for LinkTextItem.
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