@@ -7,12 +7,13 @@ import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
77 * Date: 2018-07-20
88 */
99class GSYSearchInputWidget extends StatelessWidget {
10-
1110 final ValueChanged <String > onChanged;
1211
1312 final ValueChanged <String > onSubmitted;
1413
15- GSYSearchInputWidget (this .onChanged, this .onSubmitted);
14+ final VoidCallback onSubmitPressed;
15+
16+ GSYSearchInputWidget (this .onChanged, this .onSubmitted, this .onSubmitPressed);
1617
1718 @override
1819 Widget build (BuildContext context) {
@@ -22,15 +23,24 @@ class GSYSearchInputWidget extends StatelessWidget {
2223 color: Colors .white,
2324 border: new Border .all (color: Color (GSYColors .subTextColor), width: 0.3 )),
2425 padding: new EdgeInsets .only (left: 20.0 , top: 12.0 , right: 20.0 , bottom: 12.0 ),
25- child: new TextField (
26- autofocus: false ,
27- decoration: new InputDecoration .collapsed (
28- hintText: GSYStrings .repos_issue_search,
29- hintStyle: GSYConstant .middleSubText,
30- ),
31- style: GSYConstant .middleText,
32- onChanged: onChanged,
33- onSubmitted: onSubmitted),
26+ child: new Row (children: < Widget > [
27+ new Expanded (
28+ child: new TextField (
29+ autofocus: false ,
30+ decoration: new InputDecoration .collapsed (
31+ hintText: GSYStrings .repos_issue_search,
32+ hintStyle: GSYConstant .middleSubText,
33+ ),
34+ style: GSYConstant .middleText,
35+ onChanged: onChanged,
36+ onSubmitted: onSubmitted)),
37+ new RawMaterialButton (
38+ materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
39+ padding: const EdgeInsets .only (right: 5.0 , left: 10.0 ),
40+ constraints: const BoxConstraints (minWidth: 0.0 , minHeight: 0.0 ),
41+ child: new Icon (GSYICons .SEARCH , size: 15.0 ),
42+ onPressed: onSubmitPressed)
43+ ]),
3444 );
3545 }
3646}
0 commit comments