smart_form_fields library
Behavior-first Flutter form registration, validation, and navigation.
Classes
- SmartAsyncValidators
- Factories for asynchronous validators that depend on other form fields.
- SmartDateField
- A date field backed by Flutter's Material date picker.
-
SmartDropdownField<
T> - A Material dropdown connected to the closest SmartForm.
- SmartEmailField
- A text field configured for email input and validation.
-
SmartFieldController<
T> - The state exposed to a SmartFormField builder.
- SmartForm
- Coordinates the smart fields below it.
- SmartFormController
- Imperative access to a mounted smart form.
-
SmartFormField<
T> - A generic field that participates in the closest SmartForm.
- SmartFormKey
- A key that provides imperative access to a mounted SmartForm.
- SmartFormResult
- An immutable snapshot produced by validating a smart form.
- SmartFormSchema
- A parsed, immutable form definition received from JSON.
- SmartFormState
- Mutable state and imperative operations for a mounted SmartForm.
- SmartFormTheme
-
Supplies behavior defaults to descendant
SmartFormwidgets. - SmartFormThemeData
-
Behavior defaults for descendant
SmartFormwidgets. - SmartJsonFieldDefinition
- One field in a SmartFormSchema.
- SmartJsonForm
- Builds a SmartForm from an API-provided JSON schema.
- SmartJsonValidatorDefinition
- Configuration for one synchronous validator in JSON.
- SmartPasswordField
- A password field with optional required and minimum-length validation.
- SmartPhoneField
- A phone input field without an opinionated international phone engine.
- SmartTextField
- A Material text field connected to the closest SmartForm.
- SmartValidationContext
- Read-only form values available while a dependent validator runs.
- SmartValidators
- Factories for commonly used synchronous validators.
Enums
- SmartErrorAnimation
- Animation applied when a smart field receives a validation error.
Typedefs
-
SmartAsyncValidator<
T> = Future< String?> Function(T? value) - An asynchronous validation function.
-
SmartContextAsyncValidator<
T> = Future< String?> Function(T? value, SmartValidationContext context) -
An asynchronous validator that can read form values through
context. -
SmartContextValidator<
T> = String? Function(T? value, SmartValidationContext context) -
A synchronous validator that can read other form values through
context. - SmartDateFormatter = String Function(BuildContext context, DateTime value)
- Formats a selected date for display inside SmartDateField.
-
SmartDropdownItemBuilder<
T> = Widget Function(BuildContext context, T item) - Builds the widget displayed for a dropdown item.
-
SmartFieldBuilder<
T> = Widget Function(BuildContext context, SmartFieldController< T> field) - Builds a custom field from its public state controller.
-
SmartItemLabelBuilder<
T> = String Function(T item) - Produces the fallback text label for a dropdown item.
-
SmartJsonFieldBuilder
= Widget Function(BuildContext context, SmartJsonFieldDefinition definition, List<
SmartValidator< validators, List<Object?> >SmartAsyncValidator< asyncValidators)Object?> > - Builds an application-specific JSON field type.
-
SmartJsonValidatorBuilder
= SmartValidator<
Object?> Function(SmartJsonValidatorDefinition definition) - Converts application-specific JSON validator configuration into code.
-
SmartValidator<
T> = String? Function(T? value) - A synchronous validation function.