Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* 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.
* The deprecated `stream` extension stays until 0.4.0; it was announced for removal in 0.3.0, but this release already asks for one change in a `switch`, and that is enough.

## 0.2.4

Expand Down
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
| `form.onValuesChangedStream` (`Stream<void>`) | `form.onValuesChanged` (`Listenable`) |
| `form.onStatusChangedStream` (`Stream<FieldStatus>`) | `form.onStatusChanged` (`Listenable`, no payload) |
| `BlocBuilder<FormGroupCubit, FormGroupState>` | `ValueListenableBuilder<AdvancedFormState>` — there is no `AdvancedFormBuilder` |
| `FieldCubit.stream` (inherited from `Cubit`) | `AdvancedFieldController.stream` — deprecated extension, removed in 0.3.0 ([section 9](#9-migrating-a-custom-field)) |
| `FieldCubit.stream` (inherited from `Cubit`) | `AdvancedFieldController.stream` — deprecated extension, removed in 0.4.0 ([section 9](#9-migrating-a-custom-field)) |
| `Future<void> close()` | `void dispose()` |
| `addDisposable(...)`, the `Disposable` mixin | **Removed** — override `dispose()` ([section 7](#7-lifecycle-close--dispose)) |

Expand Down Expand Up @@ -478,7 +478,7 @@ final subscription = quantityField.stream
.listen(recalculateTotals);
```

Three caveats: every read allocates a new `StreamController`, so store it rather than re-reading the getter; the controller is never closed, so unlike `Cubit.stream` it does not terminate an `await for` loop; and it goes away in 0.3.0.
Three caveats: every read allocates a new `StreamController`, so store it rather than re-reading the getter; the controller is never closed, so unlike `Cubit.stream` it does not terminate an `await for` loop; and it goes away in 0.4.0.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ needs a fresh controller. Consider `setValidationEnabled(false)` instead of deta

0.1.x controllers were cubits, so they had a `stream`. 0.2 is `Listenable`-based: `addListener`,
`subscribeToFields`, `onValuesChanged`, `onStatusChanged`, and the builder widgets. A deprecated
`AdvancedFieldController.stream` extension exists as a migration bridge and is removed in 0.3.0. See
`AdvancedFieldController.stream` extension exists as a migration bridge and is removed in 0.4.0. See
[Migration](./migration.mdx).

</Accordion>
Expand Down
2 changes: 1 addition & 1 deletion docs/migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ until the user edits it; where it must, call `validate()` on it from a listener
| `removeSubform(form, close: …)` | `removeSubform(form)` — detaches only, returns `void` |
| `Future<void> close()`, `addDisposable`, `Disposable` | `void dispose()` |
| `BlocBuilder<FormGroupCubit, FormGroupState>` | `ValueListenableBuilder<AdvancedFormState>` |
| `FieldCubit.stream` | `AdvancedFieldController.stream` — deprecated bridge, removed in 0.3.0 |
| `FieldCubit.stream` | `AdvancedFieldController.stream` — deprecated bridge, removed in 0.4.0 |

## Behaviour changes that are not renames

Expand Down
2 changes: 1 addition & 1 deletion lib/src/field/advanced_field_controller_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extension AdvancedFieldControllerListen<T, E extends Object>
/// Listeners are attached lazily on first subscription and detached when
/// the last subscription is cancelled.
@Deprecated(
'Migration bridge for 0.1.x cubit streams, to be removed in 0.3.0. '
'Migration bridge for 0.1.x cubit streams, to be removed in 0.4.0. '
'Use addListener, subscribeToFields, or the builder widgets instead.',
)
Stream<AdvancedFieldState<T, E>> get stream {
Expand Down
Loading