TextElement class
A class that holds the information of a parsed element.
- Annotations
-
- @immutable
Constructors
-
TextElement.new(String text, {List<
String?> groups = const [], Type matcherType = TextMatcher, int? matcherIndex, int offset = 0}) -
Creates a TextElement that holds the information of a parsed element.
const
Properties
-
groups
→ List<
String?> -
An array of the strings that have matched each smaller pattern
enclosed with parentheses in a match pattern.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- matcherIndex → int?
-
The index of the matcher in the matcher list passed to the
matchers
argument of TextParser.final - matcherType → Type
-
The type of the matcher whose match pattern has matched the text.
If the type is TextMatcher, it means no patterns have matched it.
final
- offset → int
-
The offset where the text starts in the source text.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
The string that has matched the pattern in one of the matchers
specified in TextParser, or that has not matched any pattern.
final
Methods
-
copyWith(
{String? text, List< String?> ? groups, Type? matcherType, int? matcherIndex, int? offset}) → TextElement - Creates a new TextElement from this one by updating individual properties.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override