@@ -8,35 +8,34 @@ class InputWidget extends StatelessWidget {
88 this .hintText = '' ,
99 super .key,
1010 });
11-
11+
1212 final TextEditingController textController;
1313 final FocusNode focusNode;
1414 final String hintText;
1515 final Function (String ) onSubmitted;
16-
1716
1817 @override
1918 Widget build (BuildContext context) => TextField (
20- controller: textController,
21- focusNode: focusNode,
22- decoration: InputDecoration (
23- hintText: hintText,
24- hintStyle: const TextStyle (
25- fontSize: 18 ,
26- fontStyle: FontStyle .italic,
27- color: Colors .grey,
28- ),
29- border: InputBorder .none,
30- contentPadding:
31- const EdgeInsets .symmetric (horizontal: 16 , vertical: 14 ),
32- focusedBorder: const OutlineInputBorder (
33- borderSide: BorderSide (color: Colors .red, width: 2 ),
19+ controller: textController,
20+ focusNode: focusNode,
21+ decoration: InputDecoration (
22+ hintText: hintText,
23+ hintStyle: const TextStyle (
24+ fontSize: 18 ,
25+ fontStyle: FontStyle .italic,
26+ color: Colors .grey,
27+ ),
28+ border: InputBorder .none,
29+ contentPadding:
30+ const EdgeInsets .symmetric (horizontal: 16 , vertical: 14 ),
31+ focusedBorder: const OutlineInputBorder (
32+ borderSide: BorderSide (color: Colors .red, width: 2 ),
33+ ),
3434 ),
35- ),
36- style: const TextStyle (fontSize: 18 ),
37- onSubmitted: onSubmitted,
38- onTapOutside: (PointerDownEvent event) {
39- focusNode.unfocus ();
40- },
41- );
35+ style: const TextStyle (fontSize: 18 ),
36+ onSubmitted: onSubmitted,
37+ onTapOutside: (PointerDownEvent event) {
38+ focusNode.unfocus ();
39+ },
40+ );
4241}
0 commit comments