TextField Snippet for API Docs (#28598)

* Added code snippet for TextField class. ref:#21136

* Errant semicolon
This commit is contained in:
Kate Lovett 2019-02-27 14:59:31 -08:00 committed by GitHub
parent 137ec45da1
commit 8539dea1ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,22 @@ typedef InputCounterWidgetBuilder = Widget Function(
/// To integrate the [TextField] into a [Form] with other [FormField] widgets,
/// consider using [TextFormField].
///
/// {@tool sample}
/// This example shows how to create a [TextField] that will obscure input. The
/// [InputDecoration] surrounds the field in a border using [OutlineInputBorder]
/// and adds a label.
///
/// ```dart
/// TextField(
/// obscureText: true,
/// decoration: InputDecoration(
/// border: OutlineInputBorder(),
/// labelText: 'Password',
/// ),
/// )
/// ```
/// {@end-tool}
///
/// See also:
///
/// * <https://material.io/design/components/text-fields.html>