mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: search page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -411,6 +411,7 @@ class _MainAppState extends State<MainApp>
|
|||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
tooltip: '搜索',
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.search_outlined,
|
Icons.search_outlined,
|
||||||
semanticLabel: '搜索',
|
semanticLabel: '搜索',
|
||||||
|
|||||||
@@ -74,12 +74,22 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 搜索建议
|
// 搜索建议
|
||||||
_searchSuggest(),
|
if (_searchController.searchSuggestion) _searchSuggest(),
|
||||||
if (_searchController.enableHotKey)
|
if (context.orientation == Orientation.portrait) ...[
|
||||||
// 热搜
|
if (_searchController.enableHotKey)
|
||||||
hotSearch(),
|
// 热搜
|
||||||
// 搜索历史
|
hotSearch(),
|
||||||
_history()
|
// 搜索历史
|
||||||
|
_history()
|
||||||
|
] else
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (_searchController.enableHotKey)
|
||||||
|
Expanded(child: hotSearch()),
|
||||||
|
Expanded(child: _history()),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -174,7 +184,11 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: EdgeInsets.fromLTRB(
|
padding: EdgeInsets.fromLTRB(
|
||||||
10,
|
10,
|
||||||
_searchController.enableHotKey ? 0 : 6,
|
context.orientation == Orientation.landscape
|
||||||
|
? 25
|
||||||
|
: _searchController.enableHotKey
|
||||||
|
? 0
|
||||||
|
: 6,
|
||||||
6,
|
6,
|
||||||
MediaQuery.of(context).padding.bottom + 50,
|
MediaQuery.of(context).padding.bottom + 50,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user