flutterx_forms 2.0.0
flutterx_forms: ^2.0.0 copied to clipboard
Declarative Flutter forms with typed fields, validators, number, date, file and list inputs, a form controller and drop support.
2.0.0 #
Major release on Dart 3.11 / Flutter 3.41: one library per concept instead of parts, fields that release what they
create, reset that restores the initial value. Fields, controllers and validators keep their names and signatures.
- Breaking: requires Dart
^3.11.0and Flutter>=3.41.0; depends onflutterx_utils: ^2.0.0. - Breaking: no longer exported (no use found in apps):
NegativePadding,RenderNegativePadding,SimplePageView,InputDecoratorContent,InputDecoratorContentBuilder,InputDecoratorContentObserver,InputDecorationParams,InputDecoratorSizedBox,ContentWidgetBuilder,ControllerSyncFormField(State),FormFieldOnChanged,FormFieldStateOnChanged,TextPickerFormFieldState,KeepAliveBuilder,defaultContextMenuBuilder,mergeValueChanged,validateIfErrorWrapper,matchesMime.DateTimeExtis removed. - Breaking:
XFormField.controller()picks the controller by type:String,int,double(also nullable) andList<String>(new:TextListEditingController); any other type without a factory throwsUnsupportedError(it returned an emptyTextEditingController). - Breaking: fields removed from
XFormFieldStore/ProxyFormField(removeField,removeLast,reset) are disposed by the store: do not dispose them again (XFormField.disposeis now idempotent anyway). - Breaking:
NumberFieldArrowsmust be inside anIntField/DoubleField(it throwsFlutterErrorotherwise). XFileis re-exported, so apps no longer need to importcross_file.TextListEditingController:separator,separatorPattern,paint,spaceFactorare optional with defaults.XTimeFormField/XDateTimeFormFieldread the current time fromclock.now()(controllable withwithClock).- Fixed:
resetrestoring the typed text instead of the initial value (text, number, text list fields);onChangednotified twice by number fields; submit callbacks run once per build; focus nodes, controllers and page controllers never disposed; number arrows changing an old controller and growing after release or unmount;enabled: falseignored byXDropdownButtonFormFieldwithoutdecoration;setStateafterawaiton disposed pickers and file fields; a drop with only rejected files throwing;validateUniqueByon fields not yet built; tabs withshrinkWrap: falseand with semantics enabled;SingleSideInputBordermargin, painting and RTL inner path;XDropViewweb listeners never removed. - Integration skills for Claude Code in
.claude-plugin/andskills/.
Migration from 1.x #
- Raise the app to Dart 3.11 / Flutter 3.41 and depend on
flutterx_forms: ^2.0.0. - Remove your own
disposecalls on fields removed from anXFormFieldStoreor aProxyFormField. XFormField<T>.controller()with aTother thanString,int,doubleorList<String>: pass acontrollerFactory.- Code that used one of the types no longer exported: copy it into the app, or use the equivalent Flutter widget.
- In tests that import both
flutter_testandflutterx_forms, hide the validatorscontainsandmatches.
1.4.95 #
- This is the best version