form_forge 1.0.1
form_forge: ^1.0.1 copied to clipboard
Code-gen form engine for Flutter. Annotate a class, run build_runner, get forms with validation, wizards, conditional fields, and theming.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-02-27 #
Added #
- Multi-step wizard forms:
@FormStep(step, title:)annotation for wizard-style forms with stepper navigation - Conditional field visibility:
@ShowWhen('field', equals: value)to show/hide fields based on other field values - Field grouping:
@FieldGroup('name')for organizing fields into visual sections with headers - New field type annotations:
@PhoneNumber()- phone number input with validation@SearchableDropdown()- searchable dropdown with autocomplete@DateRange()- date range picker@SliderInput(min, max)- slider input for numeric values@RatingInput(maxStars:)- star rating widget@ChipsInput(maxChips:)- tag/chip input for lists@ColorPicker()- color selection widget@RichTextInput(minLines, maxLines)- multiline text editor
- Serialization:
toJson()andfromJson()on generated controllers and data classes - Theming:
FormForgeThemeandFormForgeThemeProviderfor customizing form appearance - Persistence:
@FormForge(persistKey:)for automatic SharedPreferences persistence - Focus management: Auto-generated
FocusNodeper field withfocusNextField()for keyboard navigation - Async validation loading indicator: Visual feedback during async validation
- Enabled/disabled state:
isEnabledon both controller and individual fields copyWith()on both controller and data classespopulateFrom()to load data into controller from data class@AsyncValidate(debounce: Duration)- Duration-based debounce (in addition todebounceMs)
Changed #
ForgeFieldState<T>now includesisEnabledandisValidatingpropertiesFormForgeControllernow includesisEnabledsetter andclearErrors()method- Generated widgets now respect
FormForgeThemefrom context
0.1.4 - 2026-02-24 #
Fixed #
- Re-export
package:flutter/material.dartso generated.g.dartwidget code compiles with a singleimport 'package:form_forge/form_forge.dart' - Updated all README examples to use
late finalfields to avoid uninitialized field errors
0.1.2 - 2026-02-23 #
Fixed #
- Fixed double-"Form" naming bug in README examples (e.g.
LoginFormFormController→LoginFormController) - Updated install versions in README to
^0.1.1
0.1.0 - 2026-02-21 #
Added #
@FormForge()class annotation to mark form definitions- Built-in validators:
@IsRequired,@IsEmail,@MinLength,@MaxLength,@PatternValidator,@Min,@Max - Cross-field validation via
@MustMatch('otherField') - Async validation marker via
@AsyncValidate() - Custom widget override via
@FieldWidget(Type) FormForgeControllerbase class with ChangeNotifierForgeFieldState<T>for per-field state managementFormForgeValidatorinterface for custom validators- Default validation error messages