mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: icon
This commit is contained in:
@@ -36,7 +36,7 @@ class SSearchController extends GetxController {
|
||||
searchKeyWord.value = hintText;
|
||||
}
|
||||
}
|
||||
historyCacheList = List<String>.from(historyWord.get('cacheList')??[]);
|
||||
historyCacheList = List<String>.from(historyWord.get('cacheList') ?? []);
|
||||
historyList.value = historyCacheList;
|
||||
enableHotKey = setting.get(SettingBoxKey.enableHotKey, defaultValue: true);
|
||||
}
|
||||
@@ -55,6 +55,7 @@ class SSearchController extends GetxController {
|
||||
controller.value.clear();
|
||||
searchKeyWord.value = '';
|
||||
searchSuggestList.value = [];
|
||||
searchFocusNode.requestFocus();
|
||||
} else {
|
||||
Get.back();
|
||||
}
|
||||
@@ -64,12 +65,13 @@ class SSearchController extends GetxController {
|
||||
void submit() {
|
||||
// ignore: unrelated_type_equality_checks
|
||||
if (searchKeyWord == '') {
|
||||
if (hintText == ''){
|
||||
if (hintText == '') {
|
||||
return;
|
||||
}
|
||||
searchKeyWord.value = hintText;
|
||||
}
|
||||
List<String> arr = historyCacheList.where((e) => e != searchKeyWord.value).toList();
|
||||
List<String> arr =
|
||||
historyCacheList.where((e) => e != searchKeyWord.value).toList();
|
||||
arr.insert(0, searchKeyWord.value);
|
||||
historyCacheList = arr;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
||||
IconButton(
|
||||
tooltip: '搜索',
|
||||
onPressed: () => _searchController.submit(),
|
||||
icon: const Icon(CupertinoIcons.search, size: 22),
|
||||
icon: const Icon(Icons.search, size: 22),
|
||||
),
|
||||
const SizedBox(width: 10)
|
||||
],
|
||||
@@ -71,11 +71,7 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
||||
border: InputBorder.none,
|
||||
suffixIcon: IconButton(
|
||||
tooltip: '清空',
|
||||
icon: Icon(
|
||||
Icons.clear,
|
||||
size: 22,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
icon: const Icon(Icons.clear, size: 22),
|
||||
onPressed: () => _searchController.onClear(),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user