MyoroInputConfiguration class
Model to load all of the configurable arguments of MyoroInput.
- Implementers
- Annotations
-
- @immutable
- @myoroModel
Constructors
- MyoroInputConfiguration.new({MyoroInputStyleEnum inputStyle = inputStyleDefaultValue, TextAlign textAlign = textAlignDefaultValue, String label = labelDefaultValue, String text = textDefaultValue, String placeholder = placeholderDefaultValue, Widget? suffix, bool enabled = enabledDefaultValue, bool readOnly = readOnlyDefaultValue, bool autofocus = autofocusDefaultValue, bool showClearTextButton = showClearTextButtonDefaultValue, MyoroInputCheckboxOnChanged? checkboxOnChanged, MyoroInputValidation? validation, MyoroInputOnFieldSubmitted? onFieldSubmitted, MyoroInputOnChanged? onChanged, VoidCallback? onCleared, Key? inputKey, VoidCallback? onTap, FocusNode? focusNode, TextEditingController? controller})
-
Creates a new instance of MyoroInputConfiguration.
const
- MyoroInputConfiguration.fake()
-
Creates a fake instance of MyoroInputConfiguration for testing purposes.
factory
Properties
- autofocus → bool
-
Whether the input should focus when it is inserted into the widget tree.
final
- checkboxOnChanged → MyoroInputCheckboxOnChanged?
-
On changed when the checkbox next to the input is changed.
final
- controller → TextEditingController?
-
Controller of the input.
final
- enabled → bool
-
Whether the input is disabled (will be tilted for visual feedback).
final
- focusNode → FocusNode?
-
FocusNode of the input to programmatically focus on it.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputKey → Key?
-
Key of the TextFormField for specific cases.
final
- inputStyle → MyoroInputStyleEnum
-
Type of input.
final
- label → String
-
Label displayed at the top of the input.
final
- onChanged → MyoroInputOnChanged?
-
Function executed when the input is changed.
final
- onCleared → VoidCallback?
-
Function executed when
_ClearTextButton
is pressed.final - onFieldSubmitted → MyoroInputOnFieldSubmitted?
-
Function executed when enter is pressed.
final
- onTap → VoidCallback?
-
TextFormField.onTap
final - placeholder → String
-
Placeholder of the input (hint text).
final
- readOnly → bool
-
Whether the input can be editted by the user.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- self → MyoroInputConfiguration
-
no setterinherited
- showClearTextButton → bool
-
Whether to show
_ClearTextButton
or not.final - suffix → Widget?
-
Suffix Widget (i.e. a search button).
final
- text → String
-
Text of the input if controller is not provided.
final
- textAlign → TextAlign
-
TextAlign of the input.
final
- textProvided → bool
-
Returns if text was provided.
no setter
- validation → MyoroInputValidation?
-
Function executed when
GlobalKey<FormState>().currentState!.validate()
is called.final
Methods
-
copyWith(
{MyoroInputStyleEnum? inputStyle, TextAlign? textAlign, String? label, String? text, String? placeholder, Widget? suffix, bool suffixProvided = true, bool? enabled, bool? readOnly, bool? autofocus, bool? showClearTextButton, MyoroInputCheckboxOnChanged? checkboxOnChanged, bool checkboxOnChangedProvided = true, MyoroInputValidation? validation, bool validationProvided = true, MyoroInputOnFieldSubmitted? onFieldSubmitted, bool onFieldSubmittedProvided = true, MyoroInputOnChanged? onChanged, bool onChangedProvided = true, VoidCallback? onCleared, bool onClearedProvided = true, Key? inputKey, bool inputKeyProvided = true, VoidCallback? onTap, bool onTapProvided = true, FocusNode? focusNode, bool focusNodeProvided = true, TextEditingController? controller, bool controllerProvided = true}) → MyoroInputConfiguration -
inherited
-
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
Constants
- autofocusDefaultValue → const bool
- Default value for autofocus.
- enabledDefaultValue → const bool
- Default value for enabled.
- inputStyleDefaultValue → const MyoroInputStyleEnum
- Default value for inputStyle.
- labelDefaultValue → const String
- Default value for label.
- placeholderDefaultValue → const String
- Default value for placeholder.
- readOnlyDefaultValue → const bool
- Default value for readOnly.
- showClearTextButtonDefaultValue → const bool
- Default value for showClearTextButton.
- textAlignDefaultValue → const TextAlign
- Default value for textAlign.
- textDefaultValue → const String
- Default value for text.