MultiScreenFormState class

State for a multi-screen Form component with support for screen navigation and focus management for Back/Next buttons.

Inheritance

Constructors

MultiScreenFormState(List<FormConfig<FormConfigOption>> _configValues)

Properties

configScreenCount int
Number of config screens visible in the form.
no setter
configurations List<FormConfig<FormConfigOption>>
Mutable configurations which gets updated with this state.
finalinherited
currentScreenIndex int
Current screen index in multi-screen mode.
no setter
focusedButtonIndex int
Index of the focused button (0 = Back, 1 = Next).
no setter
focusedConfigIndex int
Index of the current configuration in focus.
no setterinherited
focusOnButton bool
Whether the Back/Next buttons are focused in multi-screen mode.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasSingleScreen bool
Whether there is only one config screen.
no setter
isSummary bool
Whether the current screen is the summary screen.
no setter
maxFocusedConfigIndex int
Max index of focusable configurations.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes all resources held by this state.
inherited
focusBackButton() → void
Moves focus to the back button in a multi-screen flow.
focusDown() → void
Moves focus to the next element vertically. If buttons are not in focus in multi-screen flow, then the focus is moved to the buttons.
override
focusLeft() → void
Moves focus to the previous element horizontally. If buttons are in focus (only true in multi-screen flow), then the focus is moved to the previous button.
override
focusNextButton() → void
Moves focus to the next button in a multi-screen flow.
focusRight() → void
Moves focus to the next element horizontally. If buttons are in focus (only true in multi-screen flow), then the focus is moved to the next button.
override
focusUp() → void
Moves focus to the previous element vertically. If buttons are in focus in multi-screen flow, then the focus is moved to the form.
override
getFocusedOptionIndexFor(FormConfig<FormConfigOption> config) int?
Returns the focused option for config.
inherited
getInputControllerFor(FormInputConfig config) ValidatingTextController?
Returns the ValidatingTextController for config, if any.
inherited
getInputFor(FormInputConfig config) String?
Returns the current input text for config, if any.
inherited
getSelectedOptionFor<T extends FormConfigOption>(FormConfig<T> config) → T?
Returns the selected FormConfigOption for config. For multi-select configs, use getSelectedOptionsFor instead.
inherited
getSelectedOptionsFor<T extends FormConfigOption>(FormConfig<T> config) Set<T>?
Returns all selected FormConfigOptions for config.
inherited
isOptionSelectedForConfig<T extends FormConfigOption>(FormConfig<T> config, T option) bool
Returns true if option is a selected option for config.
inherited
nextScreen() → void
Advances to the next screen in multi-screen mode.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onSelect() → void
Selects a focused button or form option. If a button is focused, navigates to the previous/next screen. Otherwise, if a form option is focused, selects it.
override
previousScreen() → void
Goes back to the previous screen in multi-screen mode.
requestFocus(FormConfig<FormConfigOption> config) → void
Requests for config to be in focus.
inherited
selectConfigOption() → void
Updates the selected FormSelectionConfig for the focused FormConfig.
inherited
setValidator(FormInputConfig config, String? validator(String)?) → void
Sets a validator function for config that will run on every text change. The validator is persisted so it survives config removal and recreation when requirements are not met.
inherited
toString() String
A string representation of this object.
inherited
updateFocusedConfig(int delta) → void
Updates the focused FormConfig by delta.
inherited
updateFocusedConfigOption(int delta) → void
Updates the focused FormConfigOption for the focused FormConfig by delta.
inherited
updateInput(FormInputConfig config, String text) → void
Updates the input text for config with text.
inherited
updateSelectedOption(FormSelectionConfig<FormConfigOption> config, FormConfigOption option) → void
Sets option as a selected value for config.
inherited

Operators

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