@@ -33,39 +33,31 @@ class _MainWidget extends StatelessWidget {
3333 appBar: AppBar (title: Semantics (headingLevel: 1 , child: Text ('$pageTitle Demo' ))),
3434 body: ListView (
3535 children: < Widget > [
36- Semantics (
37- label: 'Input field with suffix @gmail.com' ,
38- child: const TextField (
39- key: Key ('enabled text field' ),
40- keyboardType: TextInputType .emailAddress,
41- autofillHints: < String > [AutofillHints .email],
42- decoration: InputDecoration (
43- labelText: 'Email' ,
44- suffixText: '@gmail.com' ,
45- hintText: 'Enter your email' ,
46- // The field is single-line, so let the hint wrap at large
47- // text scales, one line per word.
48- hintMaxLines: 3 ,
49- ),
36+ const TextField (
37+ key: Key ('enabled text field' ),
38+ keyboardType: TextInputType .emailAddress,
39+ autofillHints: < String > [AutofillHints .email],
40+ decoration: InputDecoration (
41+ labelText: 'Email' ,
42+ hintText: 'Enter your email' ,
43+ // The field is single-line, so let the hint wrap at large
44+ // text scales, one line per word.
45+ hintMaxLines: 3 ,
5046 ),
5147 ),
52- Semantics (
53- label: 'Input field with suffix @gmail.com' ,
54- child: TextField (
55- key: const Key ('disabled text field' ),
56- keyboardType: TextInputType .emailAddress,
57- autofillHints: const < String > [AutofillHints .email],
58- decoration: const InputDecoration (
59- labelText: 'Email' ,
60- suffixText: '@gmail.com' ,
61- hintText: 'Enter your email' ,
62- // The field is single-line, so let the hint wrap at large
63- // text scales, one line per word.
64- hintMaxLines: 3 ,
65- ),
66- enabled: false ,
67- controller: TextEditingController (text: 'xyz' ),
48+ TextField (
49+ key: const Key ('disabled text field' ),
50+ keyboardType: TextInputType .emailAddress,
51+ autofillHints: const < String > [AutofillHints .email],
52+ decoration: const InputDecoration (
53+ labelText: 'Email' ,
54+ hintText: 'Enter your email' ,
55+ // The field is single-line, so let the hint wrap at large
56+ // text scales, one line per word.
57+ hintMaxLines: 3 ,
6858 ),
59+ enabled: false ,
60+ controller: TextEditingController (text: 'xyz' ),
6961 ),
7062 ],
7163 ),
0 commit comments