RichTrexSpan class

A superclass to translate TextSpan or WidgetSpan into String and the other way round.

Inheritance

Constructors

RichTrexSpan({double? fontSize, Color? color, double? verticalSpace, double? horizontalSpace, bool blockquote = false, EdgeInsetsGeometry? padding, Alignment? align, Color? backgroundColor, String? hyperlink, String? text, Shadow? shadow, String? fontFamily, FontWeight? fontWeight, bool strikeThrough = false, bool underline = false, bool overline = false, bool italic = false})
Wrapping all kind of types which later will be translated into String or the other way around.
const
RichTrexSpan.image({required RichTrexImage? image})
Wrapping only RichTrexImage types which later will be translated into String or the other way around.
const

Properties

align Alignment?
How to decode:
final
backgroundColor Color?
How to decode:
final
blockquote bool
How to decode:
final
child InlineSpan
The value of RichTrexSpan, it could be TextSpan or WidgetSpan.
no setter
color Color?
How to decode:
final
fontFamily String?
How to decode:
final
fontSize double?
How to decode:
final
fontWeight FontWeight?
How to decode:
final
hashCode int
The hash code for this object.
no setterinherited
horizontalSpace double?
How to decode:
final
How to decode:
final
image → RichTrexImage?
How to decode:
final
italic bool
How to decode:
final
overline bool
How to decode:
final
padding EdgeInsetsGeometry?
How to decode:
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadow Shadow?
How to decode:
final
strikeThrough bool
How to decode:
final
style TextStyle?
The TextStyle to apply to this span.
finalinherited
text String?
How to decode:
final
underline bool
How to decode:
final
verticalSpace double?
How to decode:
final

Methods

build(ParagraphBuilder builder, {double textScaleFactor = 1.0, List<PlaceholderDimensions>? dimensions}) → void
Apply the properties of this object to the given ParagraphBuilder, from which a Paragraph can be obtained.
override
codeUnitAt(int index) int?
Returns the UTF-16 code unit at the given index in the flattened string.
inherited
codeUnitAtVisitor(int index, Accumulator offset) int?
Performs the check at each InlineSpan for if the index falls within the range of the span and returns the corresponding code unit. Returns null otherwise.
override
compareTo(InlineSpan other) RenderComparison
Describe the difference between this span and another, in terms of how much damage it will make to the rendering. The comparison is deep.
override
computeSemanticsInformation(List<InlineSpanSemanticsInformation> collector, {Locale? inheritedLocale, bool inheritedSpellOut = false}) → void
Walks the InlineSpan tree and accumulates a list of InlineSpanSemanticsInformation objects.
override
computeToPlainText(StringBuffer buffer, {bool includeSemanticsLabels = true, bool includePlaceholders = true}) → void
Walks the InlineSpan tree and writes the plain text representation to buffer.
override
debugAssertIsValid() bool
In debug mode, throws an exception if the object is not in a valid configuration. Otherwise, returns true.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
getSemanticsInformation() List<InlineSpanSemanticsInformation>
Flattens the InlineSpan tree to a list of InlineSpanSemanticsInformation objects.
inherited
getSpanForPosition(TextPosition position) InlineSpan?
Returns the InlineSpan that contains the given position in the text.
inherited
getSpanForPositionVisitor(TextPosition position, Accumulator offset) InlineSpan?
Performs the check at each InlineSpan for if the position falls within the range of the span and returns the span if it does.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toPlainText({bool includeSemanticsLabels = true, bool includePlaceholders = true}) String
Flattens the InlineSpan tree into a single string.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
override
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
visitChildren(InlineSpanVisitor visitor) bool
Walks this InlineSpan and any descendants in pre-order and calls visitor for each span that has content.
override
visitDirectChildren(InlineSpanVisitor visitor) bool
Calls visitor for each immediate child of this InlineSpan.
inherited

Operators

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

Static Methods

decode(String text) List<RichTrexSpan>
Decoding encoded String to list of RichTrexSpan.
encode(List<RichTrexSpan> span) String
Encoding list of RichTrexSpan into String.