@@ -38,50 +38,57 @@ class _SearchPageState extends State<SearchPage> {
3838 @override
3939 Widget build (BuildContext context) {
4040 return Scaffold (
41- resizeToAvoidBottomInset: false ,
42- appBar: AppBar (
43- title: Text (AppLocalizations .of (context).search),
44- actions: [],
45- ),
46- body: Column (children: [
41+ resizeToAvoidBottomInset: false ,
42+ appBar: AppBar (
43+ title: Text (AppLocalizations .of (context).search),
44+ actions: [],
45+ ),
46+ body: Column (
47+ children: [
4748 Expanded (
48- child: ListView (
49- children: [
50- Card (
51- child: Container (
52- padding: EdgeInsets .all (10 ),
53- child: TextFormField (
54- textInputAction: TextInputAction .search,
55- onFieldSubmitted: (_) => _onSearch (),
56- autofocus: true ,
57- controller: queryController,
58- decoration: InputDecoration (
59- labelText: AppLocalizations .of (context).keywords,
60- suffixIcon: IconButton (
61- icon: const Icon (Icons .clear),
62- onPressed: () {
63- queryController.clear ();
64- },
49+ child: ListView (
50+ children: [
51+ Card (
52+ child: Container (
53+ padding: EdgeInsets .all (10 ),
54+ child: TextFormField (
55+ textInputAction: TextInputAction .search,
56+ onFieldSubmitted: (_) => _onSearch (),
57+ autofocus: true ,
58+ controller: queryController,
59+ decoration: InputDecoration (
60+ labelText: AppLocalizations .of (context).keywords,
61+ suffixIcon: IconButton (
62+ icon: const Icon (Icons .clear),
63+ onPressed: () {
64+ queryController.clear ();
65+ },
66+ ),
6567 ),
6668 ),
6769 ),
6870 ),
69- ),
70- RadioGroup <Order >(
71- groupValue: orderBy,
72- title: AppLocalizations .of (context).sort,
73- enumToText: {
74- Order .Relevance : AppLocalizations .of (context).relevance,
75- Order .Date : AppLocalizations .of (context).date,
76- Order .Rating : AppLocalizations .of (context).rating,
77- },
78- ),
79- ],
80- )),
81- Container (
71+ RadioGroup <Order >(
72+ groupValue: orderBy,
73+ title: AppLocalizations .of (context).sort,
74+ enumToText: {
75+ Order .Relevance : AppLocalizations .of (context).relevance,
76+ Order .Date : AppLocalizations .of (context).date,
77+ Order .Rating : AppLocalizations .of (context).rating,
78+ },
79+ ),
80+ ].map ((e) => DefaultConstraints (child: e)).toList (),
81+ ),
82+ ),
83+ DefaultConstraints (
84+ child: Container (
8285 padding: EdgeInsets .all (5 ),
83- child: SearchButton (onPressed: _onSearch)),
84- ]));
86+ child: SearchButton (onPressed: _onSearch),
87+ ),
88+ ),
89+ ],
90+ ),
91+ );
8592 }
8693}
8794
0 commit comments