opt: store search index

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-27 13:41:11 +08:00
parent c01e2c0b8c
commit db8d3bab51
2 changed files with 23 additions and 12 deletions

View File

@@ -19,6 +19,8 @@ class SSearchController extends GetxController {
Rx<LoadingState> loadingState = LoadingState.loading().obs;
int initIndex = 0;
@override
void onInit() {
super.onInit();
@@ -74,9 +76,13 @@ class SSearchController extends GetxController {
GStorage.historyWord.put('cacheList', historyList);
searchFocusNode.unfocus();
await Get.toNamed('/searchResult', parameters: {
'keyword': controller.text,
});
await Get.toNamed(
'/searchResult',
parameters: {
'keyword': controller.text,
},
arguments: initIndex,
);
searchFocusNode.requestFocus();
}