Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-01 15:17:42 +08:00
parent 5c28376210
commit dd5c2229b3
22 changed files with 182 additions and 177 deletions

View File

@@ -29,6 +29,7 @@ class _SearchPageState extends State<SearchPage> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final isPortrait = context.isPortrait;
return Scaffold(
appBar: AppBar(
shape: Border(
@@ -78,9 +79,9 @@ class _SearchPageState extends State<SearchPage> {
padding: MediaQuery.paddingOf(context).copyWith(top: 0),
children: [
if (_searchController.searchSuggestion) _searchSuggest(),
if (context.orientation == Orientation.portrait) ...[
if (isPortrait) ...[
if (_searchController.enableHotKey) hotSearch(theme),
_history(theme),
_history(theme, isPortrait),
if (_searchController.enableSearchRcmd) hotSearch(theme, false),
] else
Row(
@@ -97,7 +98,7 @@ class _SearchPageState extends State<SearchPage> {
],
),
),
Expanded(child: _history(theme)),
Expanded(child: _history(theme, isPortrait)),
],
),
],
@@ -257,7 +258,7 @@ class _SearchPageState extends State<SearchPage> {
);
}
Widget _history(ThemeData theme) {
Widget _history(ThemeData theme, bool isPortrait) {
return Obx(
() {
if (_searchController.historyList.isEmpty) {
@@ -267,7 +268,7 @@ class _SearchPageState extends State<SearchPage> {
return Padding(
padding: EdgeInsets.fromLTRB(
10,
context.orientation == Orientation.landscape
!isPortrait
? 25
: _searchController.enableHotKey
? 0