|
|
@@ -169,9 +169,9 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
BlocProvider.of<SearchResultGoodsListBloc>(context).add(SearchResultGoodsListSortEvent(id: id, args: arg, remove: !model.isSelect)); |
|
|
|
} |
|
|
|
setState(() { |
|
|
|
_expand = false; |
|
|
|
_isShowSX = false; |
|
|
|
_isShowZh = false; |
|
|
|
_expand = true; |
|
|
|
_isShowSX = true; |
|
|
|
_isShowZh = true; |
|
|
|
}); |
|
|
|
|
|
|
|
if (model.isSelect || data.select_list[0].isSelect) { |
|
|
@@ -181,6 +181,20 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void _onClickFinsh(SearchResultItemSort data, SearchResultSortSelect model) { |
|
|
|
String arg = model?.query_args ?? ''; |
|
|
|
String id = model?.id ?? ''; |
|
|
|
if (!EmptyUtil.isEmpty(id)) { |
|
|
|
// BlocProvider.of<SearchResultGoodsListBloc>(context).add(SearchResultGoodsListSortEvent(arg, id)); |
|
|
|
BlocProvider.of<SearchResultGoodsListBloc>(context).add(SearchResultGoodsListSortEvent(id: id, args: arg, remove: !model.isSelect)); |
|
|
|
} |
|
|
|
setState(() { |
|
|
|
_expand = false; |
|
|
|
_isShowSX = false; |
|
|
|
_isShowZh = false; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/// 点击当前 |
|
|
|
void _clickSortType(SearchResultItemSort model) { |
|
|
|
if (model.type == 'popup' || model.type == 'popup-filter') { |
|
|
@@ -292,7 +306,7 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
), |
|
|
|
], |
|
|
|
); |
|
|
|
} |
|
|
@@ -375,12 +389,9 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
lists.add(Container( |
|
|
|
padding: const EdgeInsets.only(left: 12.5, right: 12.5, top: 13, bottom: 15), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
border: Border.all(width: 0, color: Colors.white), |
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
bottomLeft: Radius.circular(12.5), |
|
|
|
bottomRight: Radius.circular(12.5), |
|
|
|
)), |
|
|
|
color: Colors.white, |
|
|
|
border: Border.all(width: 0, color: Colors.white), |
|
|
|
), |
|
|
|
child: _getStoryType(parendData, model[1]))); |
|
|
|
} |
|
|
|
} |
|
|
@@ -391,6 +402,63 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
lists.add(Container()); |
|
|
|
} |
|
|
|
|
|
|
|
lists.add(Divider( |
|
|
|
height: 1, |
|
|
|
thickness: 1, |
|
|
|
color: HexColor.fromHex("#FFEBEBEB"), |
|
|
|
)); |
|
|
|
lists.add(Container( |
|
|
|
height: 48, |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
border: Border.all(width: 0, color: Colors.white), |
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
bottomLeft: Radius.circular(12.5), |
|
|
|
bottomRight: Radius.circular(12.5), |
|
|
|
)), |
|
|
|
child: Row( |
|
|
|
children: <Widget>[ |
|
|
|
Expanded( |
|
|
|
child: GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
_reset(parendData, model[1]); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"重置", |
|
|
|
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 15), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
VerticalDivider( |
|
|
|
color: HexColor.fromHex("#FFEBEBEB"), |
|
|
|
width: 1, |
|
|
|
thickness: 1, |
|
|
|
indent: 8, |
|
|
|
endIndent: 8, |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
child: GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: (){ |
|
|
|
_onClickFinsh(parendData,model[1]); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"完成", |
|
|
|
style: TextStyle(color: HexColor.fromHex("#FFFF4242"), fontSize: 15), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)) |
|
|
|
], |
|
|
|
), |
|
|
|
)); |
|
|
|
|
|
|
|
return Column(children: lists); |
|
|
|
} |
|
|
|
|
|
|
@@ -469,7 +537,7 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
decoration: InputDecoration( |
|
|
|
filled: true, |
|
|
|
fillColor: Colors.transparent, |
|
|
|
isDense: true, |
|
|
|
isDense: true, |
|
|
|
contentPadding: EdgeInsets.zero, |
|
|
|
// contentPadding: const EdgeInsets.only(bottom: 6, left: ), |
|
|
|
border: InputBorder.none, |
|
|
@@ -495,10 +563,9 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
Text( |
|
|
|
model?.name ?? '综合', |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex( |
|
|
|
model.type != 'sort' ? model.isSelect ? widget?.model?.text_select_color ?? '#FF4242' : widget?.model?.text_no_select_color ?? '#333333' : |
|
|
|
model.state == '0' ? '#333333' : '#FF4242' |
|
|
|
), |
|
|
|
color: HexColor.fromHex(model.type != 'sort' |
|
|
|
? model.isSelect ? widget?.model?.text_select_color ?? '#FF4242' : widget?.model?.text_no_select_color ?? '#333333' |
|
|
|
: model.state == '0' ? '#333333' : '#FF4242'), |
|
|
|
fontSize: 14, |
|
|
|
), |
|
|
|
), |
|
|
@@ -556,4 +623,28 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
void _reset(SearchResultItemSort data ,SearchResultSortSelect model) { |
|
|
|
_startPriceEditingController.text = ""; |
|
|
|
_endPriceEditingController.text = ""; |
|
|
|
String arg = model?.query_args ?? ''; |
|
|
|
String id = model?.id ?? ''; |
|
|
|
model.isSelect = false; |
|
|
|
if (!EmptyUtil.isEmpty(id)) { |
|
|
|
// BlocProvider.of<SearchResultGoodsListBloc>(context).add(SearchResultGoodsListSortEvent(arg, id)); |
|
|
|
BlocProvider.of<SearchResultGoodsListBloc>(context).add(SearchResultGoodsListSortEvent(id: id, args: arg, remove: false)); |
|
|
|
} |
|
|
|
setState(() { |
|
|
|
_expand = true; |
|
|
|
_isShowSX = true; |
|
|
|
_isShowZh = true; |
|
|
|
}); |
|
|
|
|
|
|
|
if (model.isSelect || data.select_list[0].isSelect) { |
|
|
|
data.isSelect = true; |
|
|
|
} else { |
|
|
|
data.isSelect = false; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |