Add & improve DropdownButtonFormField reference to DropdownButton (#89079)
This commit is contained in:
parent
2334a9b6b0
commit
4015de94e7
@ -821,6 +821,7 @@ class DropdownButtonHideUnderline extends InheritedWidget {
|
|||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
///
|
///
|
||||||
|
/// * [DropdownButtonFormField], which integrates with the [Form] widget.
|
||||||
/// * [DropdownMenuItem], the class used to represent the [items].
|
/// * [DropdownMenuItem], the class used to represent the [items].
|
||||||
/// * [DropdownButtonHideUnderline], which prevents its descendant dropdown buttons
|
/// * [DropdownButtonHideUnderline], which prevents its descendant dropdown buttons
|
||||||
/// from displaying their underlines.
|
/// from displaying their underlines.
|
||||||
@ -1474,7 +1475,20 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A convenience widget that makes a [DropdownButton] into a [FormField].
|
/// A [FormField] that contains a [DropdownButton].
|
||||||
|
///
|
||||||
|
/// This is a convenience widget that wraps a [DropdownButton] widget in a
|
||||||
|
/// [FormField].
|
||||||
|
///
|
||||||
|
/// A [Form] ancestor is not required. The [Form] simply makes it easier to
|
||||||
|
/// save, reset, or validate multiple fields at once. To use without a [Form],
|
||||||
|
/// pass a [GlobalKey] to the constructor and use [GlobalKey.currentState] to
|
||||||
|
/// save or reset the form field.
|
||||||
|
///
|
||||||
|
/// See also:
|
||||||
|
///
|
||||||
|
/// * [DropdownButton], which is the underlying text field without the [Form]
|
||||||
|
/// integration.
|
||||||
class DropdownButtonFormField<T> extends FormField<T> {
|
class DropdownButtonFormField<T> extends FormField<T> {
|
||||||
/// Creates a [DropdownButton] widget that is a [FormField], wrapped in an
|
/// Creates a [DropdownButton] widget that is a [FormField], wrapped in an
|
||||||
/// [InputDecorator].
|
/// [InputDecorator].
|
||||||
|
Loading…
x
Reference in New Issue
Block a user