formix 0.0.4
formix: ^0.0.4 copied to clipboard
An elite, type-safe, and ultra-reactive form engine for Flutter powered by Riverpod.
0.0.4 #
π οΈ DevTools Integration #
- DevTools Extension: Added a dedicated DevTools extension for real-time form state inspection and debugging
- π Visual form state tree with field values, validation states, and metadata
- β‘ Performance monitoring for form rebuilds and validation execution
- π Deep link integration for quick access from running applications
- π Built with Flutter Web and fully integrated with the DevTools ecosystem
π Type Safety & Reliability #
- Strict Null Safety: Comprehensive null-safety across all validators and widgets
- Integration Testing: Expanded integration tests for complex scenarios
π― User Experience Enhancements #
- Rich Error Placeholders: Dynamic errors like
Field {label} must be at least {min} characters - Built-in Masking & Formatting: Input formatters in
FieldConfig - Automatic Focus Management: Submit-to-Error and Enter-to-Next implemented
π§ Advanced State Management #
-
Undo/Redo History: Snapshots for state restoration and history
-
Optimistic Field Updates: Pending state for server round-trips
-
Multi-Form Synchronization: "Binding" API to link fields between separate forms
-
Improved error messages and validation feedback
-
Fluent Validators: New
FormixValidatorsAPI for readable chainable rules -
Logging Analytics: Built-in debug logger for form events
-
Robust Dependency Logic: Support for recursive A->B->C dependency chains with cycle detection. Optimized to O(N) (10,000-field chain updates in ~70ms).
-
Correct Undo/Redo Behavior: Implemented semantic equality for form state to prevent duplicate history entries.
-
Async Submission Safety:
submit()now waits for all pending async validations to complete before proceeding -
Partial Validation:
validate(fields: [...])allows validating specific subsets of fields (e.g., for Steppers)
β‘ Performance Optimizations #
- Delta Updates: O(1) complexity for field updates (was O(N)), enabling forms with 1000+ fields
- Lazy Step Initialization: "Sleep" background steps to save memory in 50+ step forms
- Form Analytics Hook: Track completion time and abandonment points
- Built-in Localization: Support for 6 languages out-of-the-box (En, Es, Fr, De, Hi, Zh)
- Zero Configuration: Works automatically with standard Flutter
MaterialApp - Optional Delegate: New
FormixLocalizations.delegatefor seamless integration (completely optional) - Reviewable Messages: Fallback mechanism to
Localizations.localeOf(context)if delegate is missing
π§ Developer Experience #
- Enhanced visual debugging tools through DevTools extension
- Better form state introspection capabilities
- Improved error messages and validation feedback
0.0.3 #
- Upgraded flutter_riverpod to ^2.6.1
0.0.2 #
- Updated logo URL
0.0.1 #
β¨ Initial Release #
An elite, type-safe, and ultra-reactive form engine for Flutter powered by Riverpod.
π Core Features
- True Type Safety: Compile-time safety using
FormixFieldID<T>andFormixArrayID<T>. - High Performance: Granular rebuilds using Riverpod selectorsβonly affected widgets update.
- Auto-Disposable: Automatic memory management with Riverpod
autoDisposecontrollers. - Declarative API: Define form structure easily using
FormixFieldConfig.
π₯ Validation & Logic
- Smart Validation: Support for Sync, Async (with debounce), and Cross-field validation.
- Dependency Tracking: Automatic re-validation of dependent fields.
- Field Derivation: Computed fields based on other form values.
ποΈ Advanced UI Components
- Sectional Forms:
FormixSectionfor lazy-loading and organizing massive forms (100+ fields). - Form Arrays: Managed dynamic lists with type safety.
- Navigation Guard:
FormixNavigationGuardto prevent accidental data loss on dirty forms. - Performance Monitor:
FormixFieldPerformanceMonitorfor tracking widget rebuilds.
π― UX & Control
- Programmatic Focus: Jump to errors or specific fields via
FormixScope. - Automated Scrolling: Smooth scrolling to validation errors.
- State Persistence: Interface for saving/restoring form progress to local storage.
π§© Built-in Widgets
RiverpodTextFormFieldRiverpodNumberFormFieldRiverpodCheckboxFormFieldRiverpodDropdownFormFieldFormixDependentFieldFormixBuilderFormixWidget(Base class for custom components)