juice_forms 0.3.0 copy "juice_forms: ^0.3.0" to clipboard
juice_forms: ^0.3.0 copied to clipboard

Form state — fields, sync/async validation, and per-field selective rebuilds — as a Juice bloc.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.3.0 - 2026-08-12 #

Changed #

  • Requires juice ^1.6.0.
  • Declared concurrency for every event. Field/structure mutations and whole-form validate/submit/reset passes are sequential; initialization is droppable; token-guarded per-field async validation remains intentionally concurrent.
  • Whole-form submissions no longer overlap. SubmitFormEvent is sequential rather than droppable so every submitNow() caller is guaranteed to resolve.

0.2.0 - 2026-06-10 #

From dogfooding (Glean DOGFOOD.md F3).

Added #

  • Awaitable validation/submitFuture<bool> validateNow() and Future<bool> submitNow(): the use case completes the future with the outcome (isValid / handler-succeeded), so "validate, then save" flows no longer need a settle-delay after the fire-and-forget validate(). ValidateFormEvent/SubmitFormEvent gain an optional completion Completer. Additive and backward-compatible.

0.1.0 - 2026-05-28 #

Added #

  • Initial release.
  • FormsBloc — form state for a set of fields, with per-field selective rebuilds: a widget bound to FormsGroups.field('email') rebuilds only when that field changes.
  • Dynamic fields — register/unregister fields at runtime.
  • Sync + async validationValidator and AsyncValidator; async runs after sync passes, debounced, with stale results dropped (latest change wins).
  • Validatorsrequired, minLength, maxLength, email, matches (cross-field), all.
  • Submit lifecyclesubmit() does its own awaited validation pass, then runs the injected SubmitHandler; surfaces submitError, marks submitted. A submit with no handler fails loudly.
  • State — data-only FormsState/FieldState (value/error/touched/ validating/enabled) with derived isValid/isDirty/values. Validators live on the bloc config, never in state.
  • Rebuild groupsform:field:<name>, form:any, form:valid, form:status, form:fields.
0
likes
150
points
18
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Form state — fields, sync/async validation, and per-field selective rebuilds — as a Juice bloc.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#form #validation #bloc #state-management #juice

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

flutter, juice

More

Packages that depend on juice_forms