InputPart class abstract
Abstract base class for parts of a formatted input.
InputPart defines the interface for components that make up a formatted input field, such as static text, editable sections, or custom widgets. Each part can be rendered and may optionally hold a value.
Example parts:
- Static text separators (e.g., "/", "-")
- Editable numeric fields (e.g., month, day, year)
- Custom widget decorations
- Implemented types
- Implementers
Constructors
- InputPart()
-
Creates an InputPart.
const
-
InputPart.editable({required int length, bool obscureText, List<
TextInputFormatter> inputFormatters, Widget? placeholder, required double width}) -
Creates an editable input part.
constfactory
- InputPart.static(String text)
-
Creates a static text part.
constfactory
- InputPart.widget(Widget widget)
-
Creates a custom widget part.
constfactory
Properties
- canHaveValue → bool
-
Whether this part can hold a value.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- part → InputPart
-
Returns this part.
no setteroverride
- partKey → Object?
-
A unique key identifying this part.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String?
-
The current value of this part, or null if it doesn't hold a value.
no setteroverride
Methods
-
build(
BuildContext context, FormattedInputData data) → Widget - Builds the widget for this part.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withValue(
String value) → FormattedValuePart -
Creates a copy of this part with the specified value.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override