ezy_form 0.0.2
ezy_form: ^0.0.2 copied to clipboard
Easy to handle form in Flutter without any complexity. Easy to use and customize.
0.0.2 #
- Fix:
FormArrayControl.validate()now callsnotifyListeners()soEzyFormArrayControlwidgets rebuild to show errors after validation. - Fix:
FormArrayControl.markAsDirty()/markAsTouched()now callnotifyListeners(), matchingFormControl's behavior. - Fix:
FormArrayControl.validate()no longer silently treats a null or empty array as valid — the array's validators now run againstnullwhen there are no children, sorequiredValidatorcorrectly flags an empty array as invalid. - Fix:
FormGroup.isDirty/isTouchednow reflect edits made toFormControls nested inside aFormArrayControl(previously the parent group reportedfalsebecause only the array itself, not its children, was walked). - Fix:
FormArrayControl.remove(int index)is now a no-op when the index is out of range (orcontrolsis null), instead of throwingRangeError. - Fix: grammar in
FormGrouplookup error —"... not is invalid type"is now"... has invalid type". - Internal: removed a dead
List<T>branch inFormGroup._flattenMapValuesand a needless map copy in_travelNested. - Feat:
FormArrayControlnow acceptsarrayValidators: List<ArrayValidatorFn<T>>for rules that need the whole list (min/max length, uniqueness, etc.). The existingvalidatorsfield remains per-item and is propagated to each child. - Fix:
FormArrayControl.reset()now restores the array to its initial shape and values — items added viaadd()after construction are discarded and the original controls are rebuilt from a value snapshot taken in the constructor. Previously reset cleared each child in-place but left the list populated. - Fix (potentially breaking):
FormArrayControl.valuesnow returnsList<T?>?and includesnullentries for empty slots. An array with three empty items yields[null, null, null]rather than[], so the length matchescontrols.ArrayValidatorFn<T>'s argument type changed toList<T?>?accordingly. - Fix: removed
FormControl's deep-equality==/hashCodeoverride. Two distinct controls no longer compare equal just because they share the same value/state, which fixes silent collapse when storing controls in aSetorMapkey. - Fix: provider
of(context)helpers now throwStateErrorwith a descriptive message pointing atEzyFormWidget, instead of a plainException. - Chore: bumped
pubspec.yamlversion to0.0.2.
0.0.1 #
- TODO: Describe initial release.