formix 0.1.1
formix: ^0.1.1 copied to clipboard
An elite, type-safe, and ultra-reactive form engine for Flutter powered by Riverpod.
0.1.1 #
β¨ New Features #
- Enhanced Type Safety for Sealed Classes:
- Improved
FormixFieldID<T>andFormixBatchto correctly handle inheritance. Values that are subclasses ofT(such as sealed class implementations) are now properly allowed insetValue,setValues, andapplyBatch. - Added
isTypeValidandisNullableTypetoFormixFieldIDfor robust runtime type checking. - Added
sameTypes<S, V>()utility for exact type comparison when mutual sub-typing is required.
- Improved
- Async Field Enhancements:
- Implemented
onDatacallback forFormixAsyncFieldandFormixDependentAsyncFieldto enable safe post-load side effects and initial value selection. - Simplified async field initial selection by favoring the
onDatacallback over manual logic in builders.
- Implemented
- Robust Form Reset:
- Added
clearErrorsparameter toreset,resetToValues, andresetFieldsmethods to prevent immediate validation errors after a reset. - Enhanced reset logic to automatically cancel pending async validations and remove errors from the internal validation map.
- Reset operations now correctly trigger re-validation for dependent fields of reset fields.
- Added
- Granular Reactivity:
- Added selector support to
FormixDependentFieldandFormixFieldDerivationfor optimized updates. - Exposed
onDatafor better integration in parent-child field relationships.
- Added selector support to
- Type-Safe Field Preservation:
- Safely preserve and reuse existing field validators and transformers during re-registration (e.g., during hot reload or wizard step navigation) by introducing wrapped versions for automatic type conversion.
- Refined Type Validation for Inheritance:
- Enhanced
_batchUpdateto support "upgrading" from raw String initial values (e.g., from JSON) to custom Objects (likeSealedsubclasses) when a typedFormixFieldIDis used. - Improved inheritance support for raw string updates: Transitions between different custom objects (non-primitives) are now allowed to facilitate sealed class hierarchies even without explicit field registration.
- Maintained strict type safety for core primitives (num, bool, String, DateTime) to prevent unintended type mismatches.
- Fixed a potential type-inference loss in
_FieldRegistrarby improving internal generic list handling during field registration.
- Enhanced
π οΈ Core Improvements #
- Consistent Batch Updates:
RiverpodFormControllernow leveragesFormixFieldIDtype information during batch updates even when fields are not yet registered.- Enhanced type validation logic to ensure consistency between provided
FormixFieldIDs and existing initial values in the form state. - Improved error messages for type mismatches, now providing better context when values are incompatible with previously inferred types.
β‘ Performance Optimizations #
- Aggressive Caching:
- Implemented
InputDecorationandTextInputFormatterlist caching inFormixTextFormFieldandFormixNumberFormFieldto avoid redundant theme resolution. - Added explicit
FormixParameterand provider caching inFormixStateto avoid redundant family lookups and hash calculations during rebuilds. - Added
PERFORMANCE.mddocumenting the library's internal optimization strategies.
- Implemented
- Stable Provider Lifecycle:
- Switched from
ref.watchtoref.listenfor localized messages informControllerProvider. This prevents form state resets during language/locale changes. - Updated
FormixParameterto useDeepCollectionEqualityfor all collection fields, ensuring provider stability when parameters are recreated with identical data.
- Switched from
- Optimized Rebuilds:
- Refined
_FieldRegistrarto skip redundant registrations usingListEquality. - Optimized
SliverFormixArrayto watch the provider's notifier, preventing unnecessary list rebuilds on unrelated field changes.
- Refined
- Other Improvements:
- Added
updateMessages()toRiverpodFormControllerfor reactive message updates without controller recreation.
- Added
π§ͺ Testing #
- Sealed Class Type Safety: Added
test/sealed_class_test.dartto verify correct handling of sealed classes and subclasses in batch updates and field state. - Added comprehensive widget tests for
SliverFormixArrayandFormixAsyncField'sonDatabehavior. - Added stability test suite for verifying controller preservation across parent rebuilds and message updates.
- Total test count: 654 tests passing.
0.1.0 #
β¨ New Features #
- Configurable Initial Value Strategy:
- Introduced
FormixInitialValueStrategyenum to control how fields adopt initial values after their first registration. - Added
preferLocalstrategy (default): Fields intelligently adopt values from widgets if the current state isnulland not yet modified by the user. This solves common issues with late-initialized data in dynamic forms or wizards. - Added
preferGlobalstrategy: Fields strictly adhere to the initial value provided during the very first registration (at theFormixroot), ignoring subsequent updates from nested widgets. - Strategy can be configured at the
FormixFieldConfiglevel or overridden on individual field widgets.
- Introduced
π οΈ Core Improvements & Fixes #
-
Type Safety Fix for Field Registration:
- Fixed critical type casting error in
FormixFieldWidgetState._ensureFieldRegisteredthat occurred when preserving validators from existing fields. - Now uses
wrappedValidator,wrappedAsyncValidator,wrappedCrossFieldValidator, andwrappedTransformermethods to safely handle type conversions betweendynamicand typed validators. - Resolves runtime errors like
type '(DateTime?) => String?' is not a subtype of type '((dynamic) => String?)?'when using typed fields with custom validators. - Added comprehensive test suite (
type_safety_field_registration_test.dart) covering DateTime, TimeOfDay, complex objects, and validator override scenarios.
- Fixed critical type casting error in
-
Unified Ancestor Validation:
- Introduced
FormixAncestorValidatorto centralizeProviderScopeandFormixrequirement checks across all widgets. - Improved developer experience with rich, descriptive error messages and actionable code examples when configuration is missing.
- Introduced
-
Robust Field Re-registration: Updated
registerFieldslogic to track newly registered fields versus definition updates, ensuring state preservation while correctly applying initial values when appropriate. -
FormixSection Fix: Implemented
didUpdateWidgetinFormixSectionto reliably catch and register configuration changes, fixing a bug where fields in dynamic wizards or reused sections occasionally failed to initialize. -
Unified Widget API: Exposed
initialValueStrategyon all standard and adaptive form fields for fine-grained control. -
Flexibility Enhancements: Updated
FormixDependentFieldandFormixDependentAsyncFieldto support standalone usage outside ofFormixwidgets by falling back to the global controller provider. -
Robust Reset with clearErrors:
- Enhanced
reset,resetToValues, andresetFieldsto reliably clear all error states whenclearErrors: trueis provided. - Automatically cancels all pending asynchronous validation debouncers during reset to prevent late-arriving errors.
- Correctly triggers re-validation for dependent fields of reset fields, ensuring consistent form-wide validity state.
- Resets the validation lifecycle by removing internal validation flags, preventing premature re-validation in "onUserInteraction" mode.
- Enhanced
-
Fixed Hidden Bug: Resolved an edge-case where
initialValueprovided in a widget was ignored if the field had been pre-registered in the rootFormixwidget with anullvalue. -
Golden Test Refresh: Updated all error state golden tests to reflect the new premium error UI.
β‘ Performance Optimizations #
- Cached InputDecoration (FormixTextFormField & FormixNumberFormField):
- Implemented intelligent caching of
InputDecorationto avoid redundant theme resolution. - Decoration is only rebuilt when widget properties or theme actually changes.
- Reduces
Theme.of(context)lookups and decoration processing overhead. - New: Added caching for final effective decoration (with error/helper text).
- New: Added caching for input formatters list.
- Implemented intelligent caching of
- Combined Field State Notifier:
- Consolidated 4 separate
ValueNotifiers (value, validation, dirty, touched) into a single combined notifier. - Reduces
AnimatedBuilderoverhead from 4 listenables to 1. - Significantly improves rebuild performance for rapid state changes.
- Consolidated 4 separate
- Optimized Controller Subscription Setup:
- Added early return optimization for explicit controllers in
FormixFieldWidgetState. - Avoids unnecessary Riverpod subscription setup when controller is provided directly.
- Cleaner, more efficient code path for common use cases.
- Added early return optimization for explicit controllers in
- SliverFormixArray Optimization:
- Fixed rebuild issue: Changed
ref.watch(provider)toref.watch(provider.notifier). - Now only rebuilds when controller instance changes, not on every form state change.
- Prevents unnecessary rebuilds in large scrollable forms.
- Fixed rebuild issue: Changed
- Performance Impact:
- Formix vs Flutter Baseline: 13-22% FASTER than plain Flutter TextFormField!
- Passive Rebuild: 7.985ms (Flutter: 10.274ms) - 22% faster
- Mount/Unmount: 1.670ms (Flutter: 1.928ms) - 13% faster
- Pure Formix overhead: ~0.08ms per rebuild (negligible)
- Mount/Unmount cycles: ~1.5ms per cycle
- Key Insight: Granular selectors + aggressive caching = faster than baseline!
- Formix vs Flutter Baseline: 13-22% FASTER than plain Flutter TextFormField!
- Enhanced Benchmarks:
- Consolidated all performance tests into
formix_benchmarks_test.dart. - Added baseline Flutter TextFormField benchmarks for accurate comparison.
- Each test runs 3 times with 1000 iterations and averages results for accuracy.
- Beautiful box-drawing output format for easy performance tracking.
- Comprehensive documentation in
BENCHMARK_RESULTS.mdandREBUILD_OPTIMIZATION.md.
- Consolidated all performance tests into
π§ͺ Testing #
- SliverFormixArray Test Suite:
- Added comprehensive widget tests (
test/widgets/sliver_form_array_test.dart). - 10 test cases covering rendering, CRUD operations, empty states, and rebuild optimization.
- Verified that array items don't rebuild on unrelated field changes.
- Integration tests with SliverAppBar, FormixGroup, and complex UI patterns.
- Added comprehensive widget tests (
- Total Test Count: 646 tests passing (10 new SliverFormixArray tests).
0.0.9 #
π οΈ Core Improvements & Fixes #
- Improved Lifecycle Management:
Formixnow robustly handles external controllers withkeepAlive: true, ensuring they are not disposed even when the widget tree is rebuilt or navigation occurs.- Added
preventDisposalflag toRiverpodFormControllerto support external lifecycle management. - Converted
FormixBuildertoConsumerStatefulWidgetfor reliable resource cleanup and correct interaction with Riverpod's referencing system.
- Enhanced Debugging:
- Added meaningful
toString()implementation toFormixParameterfor easier debugging of provider families.
- Added meaningful
- Initial Value Override: Fixed logic to correctly prioritize field-level
initialValueover global form default values. This ensures that explicitly configured fields (e.g., inFormixTextFormField) always retain their specific initial values. - Lazy Step State Preservation: Fixed a critical issue where re-registering a field (such as waking a lazy step in a wizard) would overwrite user-entered data with the initial value. Now,
Formixintelligently preserves "dirty" (user-modified) values while still applying initial values to "clean" fields. - Race Condition Fix: Resolved a race condition in
registerFieldswhere rapid field registrations could lead to lost validation state updates. The state calculation is now encapsulated within the update closure for reliable sequential execution.
0.0.8 #
β¨ New Features #
- Form-Level Theming:
- Introduced
FormixThemeandFormixThemeDatafor centralized styling. - Support for global
InputDecorationTheme,loadingIcon, andeditIcon. - Conditional theme application via the
enabledflag.
- Introduced
- Sliver Support:
- Added
SliverFormixArrayfor high-performance dynamic lists insideCustomScrollView.
- Added
- Adaptive Support:
- Introduced
FormixAdaptiveTextFormFieldfor automatic switching between Material and Cupertino styling based on the platform.
- Introduced
- Native State Restoration:
- Introduced
RestorableFormixDataclass that extendsRestorableValue<FormixData>for seamless integration with Flutter'sRestorationMixin. - Added comprehensive
toMap()andfromMap()methods toFormixDatafor complete state serialization including:- All field values (preserving types)
- Validation states and error messages
- Dirty, touched, and pending states
- Form metadata (isSubmitting, resetCount, currentStep)
- Calculated counts (errorCount, dirtyCount, pendingCount)
- Added
toMap()andfromMap()toValidationResultfor proper validation state persistence. - Added
initialDataparameter toFormixwidget andFormixControllerfor restoring form state on initialization. - Optimized
FormixParameteridentity to excludeinitialData, preventing unnecessary provider recreation. - Full test coverage with unit tests and golden snapshot tests demonstrating restoration in real-world scenarios.
- Introduced
- Improved Documentation:
- Added "Conditional Fields" guide to README explaining usage of
FormixSectionwithkeepAlive: falsefor dynamic forms. - Added comprehensive
ConditionalFormExamplein example app showing real-world dynamic field patterns.
- Added "Conditional Fields" guide to README explaining usage of
π οΈ Core Improvements & Bug Fixes #
- Robust Count Tracking:
- Refactored internal validation logic in
_batchUpdateandvalidatemethods to ensure atomic updates oferrorCountandpendingCount. - Fixed "Double Counting" bug where
errorCountwas decremented twice during transitions from "invalid" to "async validating". - Fixed "Leaked Pending Count" where transitions from "validating" to "invalid" (synchronously) failed to decrement
pendingCount.
- Refactored internal validation logic in
- Improved validate() Behavior:
- The
validate()method now automatically marks all validated fields as touched. This aligns with standard Flutter behavior, ensuring error messages become visible in the UI immediately upon manual validation.
- The
- State Consistency:
- Enhanced
validate()to correctly populatechangedFields, ensuring reactive listeners and UI components are accurately notified of form-wide validation updates.
- Enhanced
0.0.7 #
π οΈ Core Improvements #
- Enhanced Validation Access:
FormixDataand controllers now exposeerrors(Map of field IDs to error messages) anderrorMessages(List of all error messages).- This simplifies global error handling and custom error summary displays.
- Added
@overrideannotations toFormixControllerfor improved type safety and lint compliance.
- Improved Validation Logic:
- Implemented comprehensive
autovalidateModesupport for individual fields, allowing fine-grained control over when validation occurs. - Refined error display logic to ensure messages appear exactly when expected based on field interaction and validation mode.
- Implemented comprehensive
- Enhanced Testing:
- Added new golden tests for validation states to ensure visual consistency of error states across UI components.
0.0.6 #
π Documentation Improvements #
- Enhanced Headless Documentation:
- FormixFieldStateSnapshot.valueNotifier: Added comprehensive documentation with practical examples showing how to use
ValueListenableBuilderfor granular reactivity and optimized rebuilds. - FormixRawNotifierField: Complete class documentation explaining its purpose as a performance-optimized widget for ValueNotifier-based updates, with detailed examples demonstrating the difference between full rebuilds and granular updates.
- Cookbook Section: Added extensive "Headless Widgets" cookbook with three production-ready patterns:
FormixRawFormFieldfor custom controls (star rating example)FormixRawTextFieldfor custom text inputs (feedback field with character counter)FormixRawNotifierFieldfor performance optimization (counter with granular rebuilds)
- Updated Example App: Completely rewrote the headless form example to showcase all
FormixFieldStateSnapshotproperties with real-time state indicators and latest API usage. - Table of Contents: Added Cookbook section to README with proper navigation links.
- FormixFieldStateSnapshot.valueNotifier: Added comprehensive documentation with practical examples showing how to use
0.0.5 #
π DevTools Extension Redesign (v2) #
- Premium UI: Completely overhauled the DevTools extension with a modern, tabbed interface (Fields, Dependencies, Raw State).
- Glassmorphic Aesthetics: Implemented a premium design system with transparency, blur effects, and full support for Dark/Light modes.
- Enhanced Inspection:
- Raw State Tab: Inspect structured, nested form data in real-time (powered by
toNestedMap). - Dependency Graph: Visualized field relationships showing exactly what a field depends on and what it affects.
- Status Badges: Circular indicators for Dirty, Touched, and Pending states.
- Performance Metrics: Reactive validation duration labels with color-coded status.
- Raw State Tab: Inspect structured, nested form data in real-time (powered by
- Integrated refreshing: New auto-refresh logic with customizable intervals (1s-10s) and a dedicated sync indicator.
- formDataProvider: Added a reactive provider to expose the entire
FormixDatastate.
β¨ Accessibility & Semantics (shadcn-inspired) #
- Form Semantics: The
Formixwidget now automatically reports as aSemanticsRole.form, improving structural navigation for screen readers. - Validation Semantics: All fields (including headless ones) now communicate their validation status (
invalid/valid) directly to the OS viaSemanticsValidationResult. - Intelligent Announcements: Added
FormixController.announceErrors()which automatically reads out the first validation error to assistive technologies when a submission fails.
π Standard Field Properties #
- Unified API: All Formix fields (
Text,Number,Checkbox,Dropdown) now support standardFormFieldproperties:onSaved&onResethooks.enabledstate management.forceErrorTextfor manual error overrides.errorBuilderfor custom error UI.autovalidateModefor per-field validation control.restorationIdfor state restoration.
- Explicit Controller: The
Formixwidget now supports an optional explicitcontrollerparameter, allowing for manual instantiation while keeping the reactive provider benefits.
π οΈ Core Improvements & Fixes #
- Headless API:
FormixFieldStateSnapshotnow exposesenabledanderrorBuilder, making it easier to build high-quality custom components. - Validation Fix: Fixed
RiverpodFormController.registerFieldto strictly honorautovalidateModeduring initial registration, preventing unwanted errors indisabledforms. - Type-Safe Value Retrieval:
- Reverted
getValue<T>to returnT?for better safety and backwards compatibility. - Added "smart fallback" to
getValue: now recovers values frominitialValueMapor field definitions if a field is not yet registered. - Introduced
requireValue<T>: returnsTand throws a descriptiveStateErrorif the value is null.
- Reverted
- New Field Transformers:
FormixFieldTransformer: Synchronous 1-to-1 transformation between fields.FormixFieldAsyncTransformer: Asynchronous transformation with built-in debounce and robust lifecycle management.
- Hot Reload Support: Fixed field definitions not updating during hot reload.
FormixandFormixSectionnow reliably detect configuration changes and update the controller. - Riverpod Refactors: Key widgets (
FormixFieldDerivation,FormixGroup,FormixListener) upgraded toConsumerStatefulWidgetfor better state access. - Hot Reload Support: Fixed field definitions not updating during hot reload.
FormixandFormixSectionnow reliably detect configuration changes and update the controller. - FormixSection Overhaul: Refactored to
ConsumerStatefulWidgetfor consistent lifecycle management.- Now supports synchronous registration to prevent lazy-loading race conditions.
- Reliably handles
keepAlivefor preserving state in wizards and tabs.
- Undo/Redo Stability: Fixed history pollution where focus/touch events triggered unnecessary undo steps. History is now strictly value-based using deep equality checks.
- Validation Fixes:
FormixAutovalidateMode.alwaysnow correctly shows errors immediately upon registration for all field types.- Fixed input formatter ordering in
FormixTextFormFieldandFormixNumberFormFieldto ensure config-level formatters (logic) run before widget-level formatters (UI).
- New
FormixAsyncField: Added a dedicated widget for handling asynchronous data fetching within forms.- Features built-in race condition protection and retry logic.
- Automatically re-triggers fetch on form reset (via
onRetry). - Coordinated with the form's
isPendingstate for submission safety.
- New
FormixDependentAsyncField: A simplified widget for parent-child field relationships.- Automatically watches a dependency and executes a future.
- Improved Robustness: Fixed lifecycle issues where fields could occasionally unregister during rapid state transitions.
- Supports
resetFieldto automatically clear dependent fields when the parent changes.
- Robust Reset Logic: Form resets are now tracked via an internal
resetCount, ensuring theonResethook is reliably triggered for all fields regardless of their previous dirty state. - Improved Pending State Management: Fixed "Tried to modify a provider while the widget tree was building" error by moving pending state updates to microtasks.
- Multi-Step Form Reliability: Fixed a bug where navigating back to a previous page in a multi-step form would show "required" validation errors even if fields were filled. Formix now correctly validates against preserved values during re-registration.
- Dropdown Field: Migrated
FormixDropdownFormFieldto useInputDecorator+DropdownButton. Now defensively handles values not present in the items list to prevent crashes during dynamic transitions. - Global Validation Mode:
- Introduced form-level
autovalidateModeinFormixwidget andFormixController. - Added
FormixAutovalidateMode.autoas the default for all fields, allowing them to inherit the form's global setting or explicitly override it. - Improved
onUserInteractionlogic to ensure consistent feedback when values are changed and then reverted to their initial state.
- Introduced form-level
- Infinite Loop Fix: Optimized
FormixControllerlistener notifications to prevent infinite loops when fields trigger state changes during updates (e.g., inFormixFieldAsyncTransformer). - Robust Bulk Update API:
- Added
FormixBatchfor compile-time type-safe batch building with a new fluentsetValue().to()API for guaranteed lint enforcement. - Added
FormixBatchResultfor detailed reporting on batch failures (type mismatches, missing fields). - Both
setValuesandupdateFromMapnow return results instead of throwing, with an optionalstrict: truemode for developers who prefer immediate crashes during debugging.
- Added
- High-Performance Dependency Tracking:
- Re-engineered
_collectTransitiveDependentswith a high-speed BFS implementation using an index-based queue, reducing traversal time for 100,000-field chains from 332ms to ~160ms. - Optimized internal dependents map access with zero-allocation iterables.
- Re-engineered
- Async Validation Stability:
- Fixed a critical race condition where
submit()could hang indefinitely if called while an async validation was already pending. - Corrected
pendingCountdouble-increment bug during concurrent validation cycles. - Consolidated "validating" state transitions into primary batch updates, eliminating redundant UI rebuilds.
- Fixed a critical race condition where
- Optimized State Engine:
- Implemented Lazy Map Cloning for validation results, avoiding O(N) penalties when field values change but validation results remain constant.
- Shared
FormixDatavalidation contexts across batch updates to drastically reduce GC pressure in cross-field validation chains. - Replaced functional filter/map operations in hot paths with high-performance manual loops for count calculations.
- Validation Fixes:
- Fixed
onUserInteractionmode regression where valid results weren't properly cached to track the "previously validated" state. - Corrected
FormixAutovalidateMode.alwaysbehavior during initial field registration.
- Fixed
- DevTools Integration: Forms without an explicit
formIdnow automatically register with DevTools using their internal namespace as a fallback, ensuring full visibility.
π οΈ Developer Experience #
- FormixBuilder Enhancements: Improved reactive data access patterns with better scoping.
- New
FormixWidget: Added base class for creating reusable, context-aware form components with less boilerplate.
π§ͺ Testing #
- Advanced Async Test Suite: Added comprehensive tests for
FormixDependentAsyncFieldandFormixAsyncField:- Rapid dependency change handling and debounce verification.
- State preservation during async loading unmounts.
- Validation error clearing on field resets.
- Additional Test Coverage:
- Dynamic Array Fields (Contacts List)
- Multi-Step Wizards with State Preservation
- Complex Validation Scenarios & Input Formatting
- Hot Reload & Lifecycle Behavior
- Performance & Memory Leaks (5000+ fields, rapid typing stress tests)
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)