|
@@ -119,32 +119,37 @@ class _PageState extends State<SearchPage> with UserId, InjectApi {
|
|
width: 12,
|
|
width: 12,
|
|
),
|
|
),
|
|
Image.asset("lib/assets/img/searchbar_icon_search.png"),
|
|
Image.asset("lib/assets/img/searchbar_icon_search.png"),
|
|
|
|
+ Space(
|
|
|
|
+ width: 6,
|
|
|
|
+ ),
|
|
Expanded(
|
|
Expanded(
|
|
child: Selector<SearchModel, String>(
|
|
child: Selector<SearchModel, String>(
|
|
selector: (_, model) => model.searchValue,
|
|
selector: (_, model) => model.searchValue,
|
|
- builder: (context, _value, child) => TextField(
|
|
|
|
- controller: _controller,
|
|
|
|
- maxLines: 1,
|
|
|
|
- focusNode: _focusNode,
|
|
|
|
- decoration: InputDecoration(
|
|
|
|
- hintText: '请输入搜索内容',
|
|
|
|
- contentPadding: EdgeInsets.symmetric(
|
|
|
|
- vertical: 11.5, horizontal: 6.0),
|
|
|
|
- border: InputBorder.none,
|
|
|
|
- hintStyle: TextStyle(color: Color(0xff999999))),
|
|
|
|
- onChanged: debounceValueChanged((value) {
|
|
|
|
- if(value != ""){
|
|
|
|
|
|
+ builder: (context, _value, child) => Container(
|
|
|
|
+ constraints: BoxConstraints(maxHeight: 30),
|
|
|
|
+ child: TextField(
|
|
|
|
+ controller: _controller,
|
|
|
|
+ maxLines: 1,
|
|
|
|
+ focusNode: _focusNode,
|
|
|
|
+ decoration: InputDecoration(
|
|
|
|
+ hintText: '请输入搜索内容',
|
|
|
|
+ contentPadding: const EdgeInsets.symmetric(vertical: 4.0),
|
|
|
|
+ border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
+ hintStyle: TextStyle(color: Color(0xff999999))),
|
|
|
|
+ onChanged: debounceValueChanged((value) {
|
|
|
|
+ if(value != ""){
|
|
|
|
+ _submitValue(value);
|
|
|
|
+ }
|
|
|
|
+ _model.queryValue(value);
|
|
|
|
+ Provider.of<SearchModel>(context, listen: false)
|
|
|
|
+ .updateSearchValue(value);
|
|
|
|
+ }),
|
|
|
|
+ onSubmitted: (value) {
|
|
_submitValue(value);
|
|
_submitValue(value);
|
|
- }
|
|
|
|
- _model.queryValue(value);
|
|
|
|
- Provider.of<SearchModel>(context, listen: false)
|
|
|
|
- .updateSearchValue(value);
|
|
|
|
- }),
|
|
|
|
- onSubmitted: (value) {
|
|
|
|
- _submitValue(value);
|
|
|
|
- // _searchModel.setKeyword(value);
|
|
|
|
- // Provider.of<SearchModel>(context, listen: false).queryValue(value);
|
|
|
|
- },
|
|
|
|
|
|
+ // _searchModel.setKeyword(value);
|
|
|
|
+ // Provider.of<SearchModel>(context, listen: false).queryValue(value);
|
|
|
|
+ },
|
|
|
|
+ ),
|
|
),
|
|
),
|
|
)),
|
|
)),
|
|
Visibility(
|
|
Visibility(
|