feat: 顶栏收起

This commit is contained in:
guozhigq
2023-08-06 21:05:51 +08:00
parent 930282b7bd
commit acfe556c26
10 changed files with 303 additions and 110 deletions

View File

@ -19,6 +19,7 @@ class SSearchController extends GetxController {
RxList<SearchSuggestItem> searchSuggestList = [SearchSuggestItem()].obs;
final _debouncer =
Debouncer(delay: const Duration(milliseconds: 200)); // 设置延迟时间
String hintText = '搜索';
@override
void onInit() {
@ -33,7 +34,13 @@ class SSearchController extends GetxController {
}
// 其他页面跳转过来
if (Get.parameters.keys.isNotEmpty) {
onClickKeyword(Get.parameters['keyword']!);
if (Get.parameters['keyword'] != null) {
onClickKeyword(Get.parameters['keyword']!);
}
if (Get.parameters['hintText'] != null) {
hintText = Get.parameters['hintText']!;
searchKeyWord.value = hintText;
}
}
historyCacheList = histiryWord.get('cacheList') ?? [];
historyList.value = historyCacheList;