formio 1.1.0
formio: ^1.1.0 copied to clipboard
A comprehensive Flutter package for rendering Form.io forms with 98% feature parity - includes all components, validation, wizard forms, calculated values, JavaScript support, 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.1.0 - 2026-01-12 #
Added #
- ๐ JavaScript Evaluation Support - Execute custom JavaScript for validation and calculations
- Web platform: Uses native
dart:js - Mobile/Desktop: Uses
flutter_jswith QuickJS engine - Security measures: Code validation and execution timeouts
- Web platform: Uses native
- โ
Custom JavaScript Validation -
customJSvalidator for Form.iovalidate.customfields - โ
JavaScript Calculated Values - Support for
calculateValuewith JavaScript expressions - โ
Date/Time Validators - Added 5 new validators:
minDate/maxDate- Date range validationdateRange- Convenience validator for date rangesminYear/maxYear- Year validation
- โ
File Validators - Added 2 new validators:
fileSize- File size validation (min/max with smart formatting)filePattern- File type validation (extensions and MIME types)
- ๐ Comprehensive Documentation - Updated README with unsupported features and roadmap
Changed #
- ๐ Form.io Compatibility - Increased from ~92% to ~98%
- ๐ง CalculationEvaluator - Now supports both JSONLogic and JavaScript expressions
- ๐ Validation Coverage - Improved from 61% to 95% (18/19 validators)
Dependencies #
- Added
flutter_js: ^0.8.5for JavaScript evaluation on mobile/desktop platforms
Tests #
- โ 23 new tests for date/time and file validators
- โ All 81+ core tests passing
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.1.0 #
- Components: 41/41 (100%)
- Validation: 18 validators (95% coverage)
- Tests: 81+ passing
- Lines of Code: ~2,200+ lines added
- Coverage: ~98% Form.io feature parity
Roadmap #
1.2.0 (Next) #
- โ Dynamic select data sources (API-based dropdown options)
- โ Enhanced file handling
1.3.0 #
- โ File upload to Form.io storage
- โ Unique validation via API
Future #
- โ Google Places autocomplete
- โ i18n support
- โ Accessibility improvements
[1.0.0]: https://github.com/m skayali/formio_flutter/releases/tag/v1.0.0 [0.9.0]: https://github.com/mskayali/formio_flutter/releases/tag/v0.9.0