flutter_form_builder_pro 1.0.1
flutter_form_builder_pro: ^1.0.1 copied to clipboard
A schema-driven Flutter form engine with conditional fields, async validation, multi-step wizard support, and JSON/YAML schema loading.
Changelog #
All notable changes to flutter_form_builder_pro are documented here.
This project follows Semantic Versioning and Keep a Changelog conventions.
Unreleased #
Planned #
FormSchema.fromYaml()— YAML schema loadingFormSchema.fromUrl()— fetch and parse a remote JSON/YAML schemaFieldType.multiSelectchip-based widgetexternalStateparameter onSmartFormfor fully external state ownership- Accessibility audit (screen reader labels, semantic hints)
- RTL layout support
- Full widget test suite
1.0.1 — 2026-06-26 #
Initial public release. Schema, engine, autosave, theme, and widget layers are all in place and pub.dev-ready.
Added #
Schema layer
FieldType— sealed enum with 20 built-in field types andFieldType.custom(key)for user-defined typesFieldCondition— sealed class with 9 composable operators:equals,notEquals,contains,notContains,greaterThan,lessThan,isEmpty,isNotEmpty,and,or,not— all supporttoJson()/fromJson()roundtripFieldValidator— sync + async base class with 10 built-in implementations:RequiredValidator,MinLengthValidator,MaxLengthValidator,EmailValidator,PhoneValidator,PatternValidator,MinValueValidator,MaxValueValidator,MatchFieldValidator,RemoteValidator,CustomValidatorValidators— static factory class for ergonomic validator constructionOptionsSource—OptionsSource.static(options)andOptionsSource.async(loader)with automatic caching of async resultsFieldOption— value/label/description/disabled model for selectable optionsFieldSchema— full field descriptor with named constructors for every type:.text(),.textarea(),.email(),.password(),.phone(),.number(),.dropdown(),.radio(),.checkbox(),.checkboxGroup(),.date(),.slider(),.heading(),.divider()— all supportfromJson()/toJson()FormSchema— root schema with flat (fields) and wizard (steps) modes,fromJson()/toJson(),allFieldsaccessorFormStep— wizard step withid,title,subtitle,fields,visibleWhencondition, andvalidateBeforeNextflag
Engine layer
FormStateNotifier—ChangeNotifier-based reactive state: field values, errors, dirty/touched tracking, submission state, parallel async validation viaFuture.wait, automatic value-clearing for fields that become invisible,visibleValuessnapshot (excludes hidden fields)StepController— wizard navigation with dynamic step skipping (steps whosevisibleWhenevaluates to false are skipped automatically),progress(0.0–1.0),jumpTo()for completed stepsFieldRegistry—Map<typeKey, FieldWidgetBuilder>withregister(),unregister(), andhas()for custom field typesSmartFormController— programmatic handle for a mountedSmartForm:setValue()/setValues()— pre-fill one or many fields; both queue calls made before the form mounts and replay them automatically on attachgetValue(),values,visibleValues— read current statesubmit()— returnsFuture<void>, completing once validation andonSubmitfinish runningreset(),clearErrors(),isDirty,isSubmitting,hasErrors- Throws
StateErrorif attached to a second mounted form at once, or if used afterdispose()
Autosave layer
AutosaveConfig— opt-in draft persistence with configurable storage key, debounce interval, andonDraftRestoredcallbackAutosaveEngine— persists field values, restores drafts on mount, and clears the draft on successful submission
Theme layer
FormTheme— full visual configuration:inputDecoration,inputDecorationBuilder(per-field override),labelStyle,errorStyle,helperStyle,fieldPadding,formPadding,fieldSpacing,submitButtonBuilder,nextButtonBuilder,backButtonBuilder,stepIndicatorBuilder,showLinearProgress,activeStepColor,completedStepColor,inactiveStepColor—copyWith()support
Widget layer
SmartForm— main entry-point widget, handles both flat and wizard modes,AnimatedSwitcher+SlideTransitionbetween wizard steps,onChangedper-field callback,scrollabletoggle,registryoverride, optionalcontrollerandautosaveconfigSmartTextField— coverstext,textarea,email,password(with reveal toggle),phone,number— keyboard type and input formatters auto-resolved fromFieldTypeSmartDropdownField— async options with loading indicator and retry on failureSmartRadioField— radio group with optional per-option descriptionsSmartCheckboxField— single boolean checkboxSmartCheckboxGroupField— multi-select checkbox group withmaxSelectionsenforcementSmartDateField—showDatePickerintegration withmin/maxdate boundsSmartSliderField— labeled slider with animated value badgeSmartHeadingWidget/SmartDividerWidget— decorative layout fieldsBaseFieldWrapper— shared label/error/helper layout used by all built-in widgetsSmartStepIndicator— animated numbered circles with connector lines and linear progress bar; completed steps are tappable (jump back)WizardNavigationBar— Back / Next / Submit with loading statebuildDefaultRegistry()— wires all 14 built-in type mappings
Tests
- 15 unit tests for all
FieldConditionoperators including nestedand/or - 15 unit tests for all built-in validators including async
RemoteValidator - Unit tests for
SmartFormControllercovering pre-mount queueing, multi-value set, reset, validated submission, and lifecycle/dispose guards
Example app
RegistrationFormPage— conditional fields, async email uniqueness check, password confirm matching, nested country → state visibilityOnboardingWizardPage— 4-step wizard, skippable Flutter-specific step, checkbox group with max selectionsJsonFormPage— form fully driven from an inline JSON string