mod: search from tag

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-14 12:10:27 +08:00
parent 28ef1890d1
commit 21fe0ef288
2 changed files with 15 additions and 1 deletions

View File

@@ -39,6 +39,9 @@ class SSearchController extends GetxController {
if (Get.parameters['hintText'] != null) {
hintText = Get.parameters['hintText']!;
}
if (Get.parameters['text'] != null) {
controller.text = Get.parameters['text']!;
}
}
historyList.value = List.from(GStorage.historyWord.get('cacheList') ?? []);

View File

@@ -63,12 +63,23 @@ class _SearchResultPageState extends State<SearchResultPage>
),
),
title: GestureDetector(
onTap: Get.back,
onTap: () {
if (Get.previousRoute.startsWith('/search')) {
Get.back();
} else {
Get.offNamed(
'/search',
parameters: {'text': _searchResultController.keyword},
);
}
},
behavior: HitTestBehavior.opaque,
child: SizedBox(
width: double.infinity,
child: Text(
_searchResultController.keyword,
style: Theme.of(context).textTheme.titleMedium,
maxLines: 1,
),
),
),