From 004a6bf66977b4d9ef588f9492b61d11c8d5fc71 Mon Sep 17 00:00:00 2001 From: Kamil Sztandur Date: Sat, 24 Oct 2026 15:35:51 +0200 Subject: [PATCH] Release 0.3.0 Co-Authored-By: Claude Fable 5.1 --- CHANGELOG.md | 15 +++++++++++---- example/pubspec.lock | 2 +- example/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09e56750..404f7c41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -## Unreleased +## 0.3.0 -* Validation modes are now yours to write. `ValidationMode` is a class, and `ValidationMode.custom(name, fn)` turns a one-line rule into a mode the package treats like its own. +Validation modes are now yours to write. The four modes stay as they were; what is new is that a rule none of them states no longer needs a workaround. + +* `ValidationMode` is a class, and `ValidationMode.custom(name, fn)` turns a one-line rule into a mode the package treats like its own. * The rule gets a `ValidationContext`: which event is happening (`valueChanged`, `unfocus` or `dependencyChanged`) and whether the user has ever left the field after editing it. * It never sees the status, the errors or the value, so a rule cannot switch itself off while the user is fixing a mistake. * An untouched field still validates nothing, whatever the rule says; `validate()` still ignores the mode; sync still runs before async. @@ -8,8 +10,13 @@ * Modes are compared by name, so a mode built in `build()` is not a mode change; a built-in name throws. * The docs have a page for it with a live demo, and the README and the skill cover it too. * New built-in mode `ValidationMode.afterFirstUnfocus`: quiet while the user types, validates when the field is first left, and from then on validates every edit, so an error disappears the moment the value is fixed. -* Breaking: an exhaustive `switch` over `ValidationMode` needs a default case, and `ValidationMode.values` is gone, because with custom modes there is no finite list. -* Removed the deprecated `AdvancedFieldController.stream` extension, as announced; listen with `addListener`, `subscribeToFields` or the builder widgets, and wrap a listener in a `StreamController` where a pipeline needs a stream. +* The mode pickers in the docs demos are pills that wrap, so every mode name is readable on a phone. + +Breaking changes: + +* An exhaustive `switch` over `ValidationMode` needs a default case now. +* `ValidationMode.values` is gone, because with custom modes there is no finite list. +* The deprecated `AdvancedFieldController.stream` extension is removed, as announced in 0.2.0. Listen with `addListener`, `subscribeToFields` or the builder widgets; the migration guide has a recipe for a pipeline that needs a stream. ## 0.2.4 diff --git a/example/pubspec.lock b/example/pubspec.lock index 804346c8..1c63da7e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -15,7 +15,7 @@ packages: path: ".." relative: true source: path - version: "0.2.4" + version: "0.3.0" analyzer: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index b7451697..0a029780 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,7 +1,7 @@ name: advanced_forms_example description: Gallery app for advanced_forms — one screen per documented form pattern. publish_to: "none" -version: 0.2.4 +version: 0.3.0 environment: sdk: ">=3.3.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 1c92f6c6..96b7ef0f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: advanced_forms description: Flutter form validation and state management — typed controllers for text, checkbox, dropdown and multi-select fields, async and cross-field validators, and subforms. -version: 0.2.4 +version: 0.3.0 homepage: https://github.com/leancodepl/advanced_forms repository: https://github.com/leancodepl/advanced_forms issue_tracker: https://github.com/leancodepl/advanced_forms/issues