formio 1.0.1
formio: ^1.0.1 copied to clipboard
A comprehensive Flutter package for rendering Form.io forms with 92% feature parity - includes all components, validation, wizard forms, calculated values, and full API integration.
Changelog #
All notable changes to the Form.io Flutter package 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-01-12 #
Added - Phase 1: Centralized Validation System #
- โจ Centralized Validators -
FormioValidatorsclass with 11 validation methodsrequired()- Required field validationpattern()- Regex pattern matchingminLength()/maxLength()- String length constraintsminWords()/maxWords()- Word count validationemail()- Email format validationurl()- URL format validationmin()/max()- Numeric range validationjson()- JSON format validationcombine()- Combine multiple validatorsfromConfig()- Auto-parse Form.io validate config
- ๐งช 28 comprehensive validator tests (100% passing)
- ๐ Updated TextField and TextArea components to use centralized validators
- ๐ง Added date type alias for backward compatibility
Added - Phase 2: Wizard Forms & Calculated Values #
- โจ Wizard Forms Support
WizardConfigmodel for wizard form configurationWizardRendererwidget for multi-page forms- Page navigation (Next/Previous/Jump to page)
- Visual progress indicator with clickable steps
- Page-level validation before navigation
- Form state persistence across pages
- โจ Calculated Values
CalculationEvaluatorfor JSONLogic-based calculations- Automatic recalculation on dependency changes
allowCalculateOverridesupport- Dependency extraction and tracking
- Integration with
FormRenderer
- ๐งช 13 calculation evaluator tests (100% passing)
- ๐ Shopping cart example with auto-calculated totals
- ๐ Multi-page wizard registration example
Added - Phase 3: Cross-Field Validation #
- โจ Cross-Field Validation
matchField()- Password confirmation validationcompareFields()- Numeric field comparison (>, <, >=, <=, ==, !=)crossFieldValidator()- Helper with custom error messages- Integration with
fromConfig()for matchField support
- ๐งช 15 cross-field validation tests (100% passing)
- ๐ Updated
FormioValidators.fromConfig()to accept formData context
Added - Components (6 new) #
- ๐
UnknownComponent- Fallback for unsupported types - ๐
UrlComponent- URL input with validation - ๐
AlertComponent- Display alerts (error, success, info, warning) - ๐
AddressComponent- Structured address input - ๐
TagsComponent- Chip-based tag input - ๐
FormComponent- Nested form support
Added - Example App #
- ๐ฑ Complete live demo application
- ๐ Form list page with API integration
- ๐ Form detail page with rendering and JSON view
- ๐จ Material 3 UI design
- ๐ Loading and error states
- โ Submission handling with visual feedback
Fixed #
- ๐ CRITICAL: Fixed ComponentModel.fromJson mutation bug
- Changed from mutating original JSON to creating a copy
- Prevents components from becoming "unsupported" on form revisit
- ๐ Fixed AlertComponent using correct
alertTypefield - ๐ Fixed flaky tests in AlertComponent
- ๐ง Removed unused imports to fix lint warnings
Changed #
- โป๏ธ Refactored FormRenderer to support calculated values
- โป๏ธ Enhanced ComponentFactory with better error handling
- ๐ Improved documentation across all components
- ๐งช Increased test coverage to 56 tests (100% passing)
Performance #
- โก Optimized calculated value recalculation with dependency tracking
- โก Efficient wizard form state management with separate FormStates per page
0.9.0 2025-XX-XX #
Added #
- Initial implementation of 35 Form.io components
- Basic validation support (required only)
- Simple conditional logic
- API services (Form, Submission, User, Auth, Action)
- FormRenderer widget
- ComponentFactory pattern
Known Limitations #
- No wizard form support
- No calculated values
- Limited validation rules
- No cross-field validation
Migration Guide #
Upgrading from 0.9.x to 1.0.0 #
Validation Changes
Before (0.9.x):
validator: _isRequired
? (val) => (val == null || val.isEmpty)
? '${component.label} is required.'
: null
: null
After (1.0.0):
validator: FormioValidators.fromConfig(
component.raw['validate'],
component.label,
formData: _formData, // For cross-field validation
)
Component JSON Changes
No breaking changes to component JSON structure. All existing forms are compatible.
New features:
- Add
matchFieldtovalidatefor password confirmation - Add
calculateValuefor auto-calculated fields - Set
display: 'wizard'for multi-page forms
Statistics #
Version 1.0.0 #
- Components: 41/41 (100%)
- Validation: 11 validators
- Tests: 56/56 passing
- Lines of Code: ~1,780 lines added
- Coverage: ~92% Form.io feature parity
Roadmap #
Future Enhancements #
- โ Select data sources (API-based dropdown options)
- โ Unique validation via API
- โ File upload to external providers
- โ Google Places autocomplete
- โ i18n support
- โ Accessibility improvements