SingleSpaceFormatter class
A custom TextInputFormatter that prevents consecutive spaces and ensures that a single space is only allowed between words.
This formatter helps maintain clean and structured user input by restricting multiple consecutive spaces.
- Inheritance
-
- Object
- TextInputFormatter
- SingleSpaceFormatter
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
formatEditUpdate(
TextEditingValue oldValue, TextEditingValue newValue) → TextEditingValue -
Formats the text input by allowing only a single space between words.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited