attributed_text library

Classes

AttributedSpans
A set of spans, each with an associated Attribution, that take up some amount of space in a discrete range.
AttributedText
Text with attributions applied to desired spans of text.
Attribution
An attribution that can be associated with a span within an AttributedSpan.
AttributionSpan
An Attribution span from start to end, inclusive.
AttributionVisitor
Visitor that visits every start and end attribution marker in an AttributedText
CallbackAttributionVisitor
AttributionVisitor that delegates to given callbacks.
ExpectedSpans
MultiAttributionSpan
A span that contains zero or more attributions.
NamedAttribution
Attribution that is defined by a given String.
SpanMarker
Marks the start or end of an attribution span.
SpanRange
A range of characters in a string of text, based on Flutter's TextRange.

Enums

AttributionVisitEvent
SpanMarkerType
The type of a marker within a span, either start or end.

Functions

getCharacterEndBounds(String text, int startingCodePointIndex) int
Returns the code point index for the code point that ends the visual character that begins at startingCodePointIndex.
getCharacterStartBounds(String text, int endingCodePointIndex) int
Returns the code point index for the code point that begins the visual character that ends at endingCodePointIndex.

Typedefs

AttributionFilter = bool Function(Attribution candidate)
Returns true when the given candidate Attribution matches the desired condition.
AttributionSpanVisitor = void Function(MultiAttributionSpan span)
VisitAttributionsCallback = void Function(AttributedText fullText, int index, Set<Attribution> startingAttributions, Set<Attribution> endingAttributions)
Visits every index in the the given AttributedText which has at least one start or end marker, passing the attributions that start or end at the index.
VoidCallback = void Function()
A zero-parameter function that returns nothing.