@@ -408,9 +408,7 @@ class _GFAppBarState extends State<GFAppBar> {
408408 );
409409 }
410410
411- searchBar = ListTile (
412- contentPadding: EdgeInsets .zero,
413- title: TextField (
411+ searchBar = TextField (
414412 cursorColor: widget.searchBarColorTheme,
415413 style: widget.searchTextStyle,
416414 decoration: new InputDecoration (
@@ -419,6 +417,19 @@ class _GFAppBarState extends State<GFAppBar> {
419417 color: widget.searchBarColorTheme,
420418 size: 18.0 ,
421419 ),
420+ suffixIcon: GFIconButton (
421+ icon: Icon (
422+ Icons .close,
423+ color: widget.searchBarColorTheme,
424+ size: 20.0 ,
425+ ),
426+ type: GFButtonType .transparent,
427+ onPressed: () {
428+ setState (() {
429+ showSearchBar = ! showSearchBar;
430+ });
431+ },
432+ ),
422433 hintText: widget.searchHintText,
423434 hintStyle: widget.searchHintStyle,
424435 focusedBorder: UnderlineInputBorder (
@@ -429,20 +440,6 @@ class _GFAppBarState extends State<GFAppBar> {
429440 onChanged: widget.onChanged,
430441 controller: widget.searchController,
431442 onSubmitted: widget.onSubmitted,
432- ),
433- trailing: GFIconButton (
434- icon: Icon (
435- Icons .close,
436- color: widget.searchBarColorTheme,
437- size: 20.0 ,
438- ),
439- type: GFButtonType .transparent,
440- onPressed: () {
441- setState (() {
442- showSearchBar = ! showSearchBar;
443- });
444- },
445- ),
446443 );
447444
448445 if (! showSearchBar) {
0 commit comments