TextField Snippet for API Docs (#28598)
* Added code snippet for TextField class. ref:#21136 * Errant semicolon
This commit is contained in:
parent
137ec45da1
commit
8539dea1ef
@ -65,6 +65,22 @@ typedef InputCounterWidgetBuilder = Widget Function(
|
|||||||
/// To integrate the [TextField] into a [Form] with other [FormField] widgets,
|
/// To integrate the [TextField] into a [Form] with other [FormField] widgets,
|
||||||
/// consider using [TextFormField].
|
/// 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:
|
/// See also:
|
||||||
///
|
///
|
||||||
/// * <https://material.io/design/components/text-fields.html>
|
/// * <https://material.io/design/components/text-fields.html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user