custom_text library

Classes

CustomSpanBuilder
A class that builds a TextSpan based on definitions.
CustomText
A text widget that decorates substrings and enables tap, long-press and/or hover gestures on them based on flexible definitions.
CustomTextEditingController
A variant of TextEditingController that decorates strings in an editable text field and enables tap, long-press and/or hover gestures based on flexible definitions.
Definition
The base class for definitions of rules for parsing, appearance and actions for CustomText and CustomTextEditingController.
EmailMatcher
A variant of TextMatcher for parsing email addresses.
ExactMatcher
A variant of TextMatcher for parsing strings that exactly match any of the strings in the passed list.
GestureDetails
A class with details on a gesture and the element where the gesture was detected.
LinkMatcher
A variant of TextMatcher for parsing Markdown link format.
ParserOptions
A class that configures how regular expressions are treated in the default parser or specifies a different parser to use.
PatternMatcher
A variant of TextMatcher that takes a regular expression pattern as a parameter.
SelectiveDefinition
A class that defines parsing rules, appearance and actions, and flexibly selects the string to be shown and another string to be passed to callbacks (e.g. onTap, onGesture).
SpanDefinition
A class that defines parsing rules, appearance and actions, and builds the InlineSpan to replace matched strings with.
TelMatcher
A variant of TextMatcher for parsing phone numbers.
TextDefinition
A class that defines parsing rules, appearance and actions for CustomText, CustomTextEditingController and CustomSpanBuilder.
TextElement
A class that holds the information of a parsed element.
TextMatcher
A base class of matchers used to provide TextParser with match patterns for parsing.
TextParser
A class that parses text according to specified matchers.
UrlLikeMatcher
A variant of TextMatcher for parsing URL-like strings.
UrlMatcher
A variant of TextMatcher for parsing URLs that start with http(s).

Enums

GestureKind
The kind of a gesture event.

Extensions

TextElementsExtension on Iterable<TextElement>
Extensions on a collection of TextElement.

Typedefs

ActionTextSelector = String Function(TextElement)
The signature for a callback to select a string to be passed to gesture callbacks.
ExternalParser = Future<List<TextElement>> Function(String)
The signature for an external parser function.
GestureCallback = void Function(GestureDetails)
The signature for a callback to return a GestureDetails.
ShownTextSelector = String Function(TextElement)
The signature for a callback to select a string to display.
SpanBuilder = InlineSpan Function(TextElement)
The signature for a callback to return an InlineSpan to be used as part of the text to display.