form library

Form fields, validators, and submit controls built on gmana validation.

Classes

GCheckboxField
Checkbox tile that participates in form validation.
GConfiguredTextFormField
GConfirmPasswordField
Confirm-password preset kept for discoverability.
GDateField
Date picker rendered as a read-only form field.
GDropdownField<T>
Typed dropdown that participates in form validation and, when named, reports into a GFormController's typed values.
GEmailField
Email preset kept for discoverability.
GForm
Thin wrapper around Flutter's Form that uses a GFormController.
GFormController
Coordinates a Flutter Form and named text controllers.
GFormFieldController<T>
Controller for a single typed field value.
GFormSubmitButton
Submit button wired to a GFormController.
GFormValues
Snapshot of typed form values keyed by field name.
GIdentifierField
Form field widget for identifier inputs (UUID, ULID, IMEI, EAN, CreditCard, MongoId, SemVer, NanoId).
GNetworkField
Form field widget for network address inputs (IP, IPv4, IPv6, CIDR, MAC, Port).
GNumberField
Number preset kept for discoverability.
GObscurableTextFormField
GPasswordField
Password preset kept for discoverability.
GPhoneField
Phone number preset kept for discoverability.
GPinCodeField
Discrete digit box PIN / OTP code entry field widget.
GSearchField
Form field widget optimized for debounced search input.
GSwitchField
Switch tile that participates in form validation.
GTextFieldConfig
Shared configuration for every text-based form field in this package.
GTextFormField
Generic text form field with named constructors for common form inputs.
GUrlField
URL preset kept for discoverability.
GValidators
Reusable FormField.validator building blocks.
VisibilityToggle
Reusable widget for toggling password visibility.

Functions

asFormValidator<TIssue extends ValidationIssue, TValue>({required ValidationResult<TIssue, TValue> validate(String input), required ValidationMessageResolver<TIssue> resolve, String? validatorOverride(String?)?}) → String? Function(String?)
Converts a canonical validator into a Flutter-style form validator.
buildFieldErrorText(FormFieldState<Object?> field) → Widget
Renders a FormField's error message in the theme's error style.
combineValidators(List<GFormValidator?> validators) → GFormValidator
Runs validators in order and returns the first message produced.
formatIsoDate(DateTime date) → String
yyyy-MM-dd — locale-independent, and the default so this package does not have to depend on intl.

Typedefs

GFormValidator = String? Function(String? value)
Flutter FormField.validator compatible validator.
GFormValueParser = Object? Function(String text)
Parses text input into a typed form value.
GTypedFormValidator<T> = String? Function(T? value, GFormValues values)
Validator that can inspect both the field value and the whole form.