Unverified Commit 8539dea1 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

TextField Snippet for API Docs (#28598)

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

* Errant semicolon
parent 137ec45d
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment