@@ -19,7 +19,6 @@ class GFSearchBar<T> extends StatefulWidget {
1919 this .noItemsFoundWidget,
2020 }) : super (key: key);
2121
22-
2322 /// List of [text] or [widget] reference for users
2423 final List <T > searchList;
2524
@@ -131,38 +130,37 @@ class MySingleChoiceSearchState<T> extends State<GFSearchBar<T>> {
131130
132131 @override
133132 Widget build (BuildContext context) {
134-
135- overlaySearchListHeight =
136- widget.overlaySearchListHeight ?? MediaQuery .of (context).size.height / 4 ;
133+ overlaySearchListHeight = widget.overlaySearchListHeight ??
134+ MediaQuery .of (context).size.height / 4 ;
137135 searchBox = Padding (
138- padding: const EdgeInsets .symmetric (vertical: 12 , horizontal: 16 ),
139- child: TextField (
140- controller: _controller,
141- focusNode: _focusNode,
142- style: TextStyle (fontSize: 16 , color: Colors .grey[600 ]),
143- decoration: InputDecoration (
144- enabledBorder: const OutlineInputBorder (
145- borderSide: BorderSide (
146- color: Color (0x4437474F ),
147- ),
148- ),
149- focusedBorder: OutlineInputBorder (
150- borderSide: BorderSide (
151- color: Theme .of (context).primaryColor,
152- ),
153- ),
154- suffixIcon: Icon (Icons .search),
155- border: InputBorder .none,
156- hintText: "Search here..." ,
157- contentPadding: const EdgeInsets .only (
158- left: 16 ,
159- right: 20 ,
160- top: 14 ,
161- bottom: 14 ,
162- ),
163- ),
136+ padding: const EdgeInsets .symmetric (vertical: 12 , horizontal: 16 ),
137+ child: TextField (
138+ controller: _controller,
139+ focusNode: _focusNode,
140+ style: TextStyle (fontSize: 16 , color: Colors .grey[600 ]),
141+ decoration: InputDecoration (
142+ enabledBorder: const OutlineInputBorder (
143+ borderSide: BorderSide (
144+ color: Color (0x4437474F ),
164145 ),
165- );
146+ ),
147+ focusedBorder: OutlineInputBorder (
148+ borderSide: BorderSide (
149+ color: Theme .of (context).primaryColor,
150+ ),
151+ ),
152+ suffixIcon: Icon (Icons .search),
153+ border: InputBorder .none,
154+ hintText: "Search here..." ,
155+ contentPadding: const EdgeInsets .only (
156+ left: 16 ,
157+ right: 20 ,
158+ top: 14 ,
159+ bottom: 14 ,
160+ ),
161+ ),
162+ ),
163+ );
166164
167165 final column = Column (
168166 mainAxisSize: MainAxisSize .min,
@@ -248,7 +246,8 @@ class MySingleChoiceSearchState<T> extends State<GFSearchBar<T>> {
248246 itemBuilder: (context, index) => Material (
249247 color: Colors .transparent,
250248 child: InkWell (
251- onTap: () => onSearchListItemSelected (_searchList[index]),
249+ onTap: () =>
250+ onSearchListItemSelected (_searchList[index]),
252251 child: widget.overlaySearchListItemBuilder (
253252 _searchList.elementAt (index),
254253 ),
@@ -274,8 +273,6 @@ class MySingleChoiceSearchState<T> extends State<GFSearchBar<T>> {
274273 }
275274}
276275
277-
278-
279276//class GFSearch extends StatefulWidget {
280277// @override
281278// _GFSearchState createState() => new _GFSearchState();
0 commit comments