NixyTextFieldController class

The NixyTextFieldController class is a custom implementation of the TextEditingController in Dart that supports various text patterns and styles, including URLs, checkboxes, and code blocks.

Inheritance

Constructors

NixyTextFieldController(Map<String, TextStyle> patterns, BuildContext context)
The NixyTextFieldController class is a custom implementation of the TextEditingController in Dart that supports various text patterns and styles, including URLs, checkboxes, and code blocks.

Properties

context BuildContext
Build context
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
pattern Pattern
The final Pattern pattern; line is declaring a final variable pattern of type Pattern. This variable is used to store a regular expression pattern that matches the different text patterns that the NixyTextFieldController class supports, such as URLs, checkboxes, and code blocks. The regular expression pattern is created by joining the keys of the patterns map with the | character, which means "or" in regular expressions. The multiLine: true parameter is used to indicate that the regular expression should match across multiple lines. This pattern variable is used in the splitMapJoin method in the buildTextSpan method to split the text into different parts based on the regular expression pattern.
final
patterns Map<String, TextStyle>
final Map<String, TextStyle> patterns; is declaring a final variable patterns of type Map<String, TextStyle>. This variable is used to store the different text patterns and their corresponding text styles that the NixyTextFieldController class supports, such as URLs, checkboxes, and code blocks. The keys of the map are the pattern strings, and the values are the corresponding TextStyle objects that define how the text should be styled when that pattern is matched.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection TextSelection
The currently selected range within text.
getter/setter pairinherited
text String
The current string the user is editing.
getter/setter pairinherited-getteroverride-setter
value TextEditingValue
The current value stored in this notifier.
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
buildTextSpan({required BuildContext context, required bool withComposing, TextStyle? style}) TextSpan
Builds TextSpan from current editing value.
override
clear() → void
Set the value to empty.
inherited
clearComposing() → void
Set the composing region to an empty range.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

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