Doc fix for DropdownButtonFormField.value (#144427)

Fixes https://github.com/flutter/flutter/issues/144135

This PR is just a doc fix.
This commit is contained in:
Qun Cheng 2024-03-04 18:52:20 +00:00 committed by GitHub
parent 35863b753f
commit 7c50267fa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -1555,6 +1555,8 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
/// pass a [GlobalKey] to the constructor and use [GlobalKey.currentState] to
/// save or reset the form field.
///
/// The `value` parameter maps to [FormField.initialValue].
///
/// See also:
///
/// * [DropdownButton], which is the underlying text field without the [Form]

View file

@ -445,6 +445,9 @@ class FormField<T> extends StatefulWidget {
final FormFieldBuilder<T> builder;
/// An optional value to initialize the form field to, or null otherwise.
///
/// This is called `value` in the [DropdownButtonFormField] constructor to be
/// consistent with [DropdownButton].
final T? initialValue;
/// Whether the form is able to receive user input.