MinFormInput class

Drop-in FormField wrapper around MinInput.

Mirrors the TextFormField ergonomics (initialValue, controller, validator, autovalidateMode, forceErrorText, onChanged, onSubmitted, restorationId) while reusing the MinInput look and feel — including its focus ring, counter and leading/trailing slots.

Form(
  key: _formKey,
  child: MinFormInput(
    placeholder: 'tu@correo.com',
    type: MinInputType.email,
    validator: (v) => (v == null || !v.contains('@'))
        ? 'Email inválido'
        : null,
  ),
)
Inheritance

Constructors

MinFormInput({Key? key, TextEditingController? controller, String? initialValue, FocusNode? focusNode, String? placeholder, MinInputType type = MinInputType.text, MinInputVariant variant = MinInputVariant.normal, MinInputStyle? style, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = TextCapitalization.none, bool autofocus = false, Widget? leading, Widget? trailing, bool? obscureText, bool? autocorrect, bool enableSuggestions = true, int? maxLength, int? maxLines, int? minLines, bool showCounter = false, String? semanticLabel, double? height, EdgeInsets contentPadding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8), ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, VoidCallback? onEditingComplete, List<TextInputFormatter>? inputFormatters, bool enabled = true, String? forceErrorText, FormFieldSetter<String>? onSaved, FormFieldValidator<String>? validator, AutovalidateMode? autovalidateMode, String? restorationId})

Properties

autocorrect → bool?
Whether autocorrect is enabled.
final
autofocus → bool
Auto-focus when the widget is first rendered.
final
autovalidateMode → AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
finalinherited
builder → FormFieldBuilder<String>
Function that returns the widget representing this form field.
finalinherited
contentPadding → EdgeInsets
Inner padding of the field.
final
controller → TextEditingController?
Controls the text being edited.
final
enabled → bool
Whether the field is enabled. Disabled fields ignore input and show a muted appearance.
final
enableSuggestions → bool
Whether IME suggestions are enabled.
final
errorBuilder → FormFieldErrorBuilder?
Function that returns the widget representing the error to display.
finalinherited
forceErrorText → String?
An optional property that forces the FormFieldState into an error state by directly setting the FormFieldState.errorText property without running the validator function.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
height → double?
Fixed height override.
final
initialValue → String?
An optional value to initialize the form field to, or null otherwise.
finalinherited
inputFormatters → List<TextInputFormatter>?
Input formatters applied to the field.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType → TextInputType?
Keyboard type override.
final
leading → Widget?
Widget shown before the editable area.
final
maxLength → int?
Maximum allowed length.
final
maxLines → int?
Maximum number of lines. Ignored when type is not MinInputType.multiline.
final
minLines → int?
Minimum number of lines. Ignored when type is not MinInputType.multiline.
final
obscureText → bool?
Whether to obscure the text (passwords).
final
onChanged → ValueChanged<String>?
Called when the user initiates a change to the field value.
final
onEditingComplete → VoidCallback?
Called when editing is completed.
final
onReset → VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
finalinherited
onSaved → FormFieldSetter<String>?
An optional method to call with the final value when the form is saved via FormState.save.
finalinherited
onSubmitted → ValueChanged<String>?
Called when the user submits the value (Enter / IME action).
final
placeholder → String?
Placeholder shown when the field is empty.
final
restorationId → String?
Restoration ID to save and restore the state of the form field.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String?
Accessibility label.
final
showCounter → bool
Show a character counter when maxLength is set.
final
style → MinInputStyle?
Optional style override.
final
textCapitalization → TextCapitalization
Text capitalization strategy.
final
textInputAction → TextInputAction?
Text input action override.
final
trailing → Widget?
Widget shown after the editable area.
final
type → MinInputType
Semantic input type (text, email, number, phone, url, password).
final
validator → FormFieldValidator<String>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
finalinherited
variant → MinInputVariant
Visual variant.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → FormFieldState<String>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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