Skip to main content

flutterx_forms 2.0.0 copy "flutterx_forms: ^2.0.0" to clipboard
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.0 and Flutter >=3.41.0; depends on flutterx_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. DateTimeExt is removed.
  • Breaking: XFormField.controller() picks the controller by type: String, int, double (also nullable) and List<String> (new: TextListEditingController); any other type without a factory throws UnsupportedError (it returned an empty TextEditingController).
  • Breaking: fields removed from XFormFieldStore/ProxyFormField (removeField, removeLast, reset) are disposed by the store: do not dispose them again (XFormField.dispose is now idempotent anyway).
  • Breaking: NumberFieldArrows must be inside an IntField/DoubleField (it throws FlutterError otherwise).
  • XFile is re-exported, so apps no longer need to import cross_file.
  • TextListEditingController: separator, separatorPattern, paint, spaceFactor are optional with defaults.
  • XTimeFormField/XDateTimeFormField read the current time from clock.now() (controllable with withClock).
  • Fixed: reset restoring the typed text instead of the initial value (text, number, text list fields); onChanged notified 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: false ignored by XDropdownButtonFormField without decoration; setState after await on disposed pickers and file fields; a drop with only rejected files throwing; validateUniqueBy on fields not yet built; tabs with shrinkWrap: false and with semantics enabled; SingleSideInputBorder margin, painting and RTL inner path; XDropView web listeners never removed.
  • Integration skills for Claude Code in .claude-plugin/ and skills/.

Migration from 1.x #

  1. Raise the app to Dart 3.11 / Flutter 3.41 and depend on flutterx_forms: ^2.0.0.
  2. Remove your own dispose calls on fields removed from an XFormFieldStore or a ProxyFormField.
  3. XFormField<T>.controller() with a T other than String, int, double or List<String>: pass a controllerFactory.
  4. Code that used one of the types no longer exported: copy it into the app, or use the equivalent Flutter widget.
  5. In tests that import both flutter_test and flutterx_forms, hide the validators contains and matches.

1.4.95 #

  • This is the best version
2
likes
150
points
343
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Declarative Flutter forms with typed fields, validators, number, date, file and list inputs, a form controller and drop support.

Homepage

License

BSD-3-Clause (license)

Dependencies

clock, collection, cross_file, file_selector, flutter, flutterx_utils, intl, mime, web

More

Packages that depend on flutterx_forms