Input class

An input component.

Constructors

Input({required String prompt, bool validator(String)?, String initialText = '', String? defaultValue})
Constructs an Input component with the default theme.
Input.withTheme({required String prompt, required Theme theme, bool validator(String)?, String initialText = '', String? defaultValue})
Constructs an Input component with the supplied theme.

Properties

defaultValue String?
The value to be hinted in the prompt and will be used if the user's input is empty.
final
hashCode int
The hash code for this object.
no setterinherited
initialText String
The initial text to be filled in the input box.
final
prompt String
The prompt to be shown together with the user's input.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme Theme
The theme for the component.
final
validator → (bool Function(String)?)
The function that runs with the value after the user has entered the input. If the function throw a ValidationError instead of returning true, the error will be shown and a new input will be asked.
final

Methods

createState() → _InputState
Creates a State for current component, inspired by Flutter's StatefulWidget.
disposeState(State<Component> state) → void
Disposes current state, to make the Context null and unusable after the rendering is completely finished.
inherited
interact() String
Starts the rendering processs.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pipeState(State<Component> state) → State<Component>
Pipes the state after running createState in case of needing to handle the state from outside.
inherited
toString() String
A string representation of this object.
inherited

Operators

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