Skip to content

Commit 97c5249

Browse files
authored
Document Form.onChange precedence over DropdownButtonFormField.onChange (flutter#175249)
## Description This PR adds some documentation to `DropdownButtonFormField.onChanged` to clarify the precedence order related to `Form.onChanged`. ## Related Issue Fixes [DropdownButtonFormField changes not absorbing Form onChanged Function](flutter#86336) ## Tests Documentation only
1 parent f0bce23 commit 97c5249

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/flutter/lib/src/material/dropdown.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,10 @@ class DropdownButtonFormField<T> extends FormField<T> {
18871887
);
18881888

18891889
/// {@macro flutter.material.dropdownButton.onChanged}
1890+
///
1891+
/// This callback is invoked after the parent [Form]'s [Form.onChanged] callback.
1892+
/// The field's updated value is available in the [Form.onChanged] callback
1893+
/// via [FormFieldState.value].
18901894
final ValueChanged<T?>? onChanged;
18911895

18921896
/// The decoration to show around the dropdown button form field.

0 commit comments

Comments
 (0)