Skip to content

Commit

Permalink
[Test] Try fix ios top padding of search page
Browse files Browse the repository at this point in the history
  • Loading branch information
canxin121 committed Jul 18, 2024
1 parent 2dd3fc9 commit 2f8520d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 4 additions & 5 deletions lib/pages/search_page/search_music_aggregator_page.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:io';

import 'package:app_rhyme/comps/music_container_comp/music_container_list_item.dart';
import 'package:app_rhyme/pages/muti_select_pages/muti_select_music_container_listview_page.dart';
import 'package:app_rhyme/pages/search_page/combined_search_page.dart';
Expand Down Expand Up @@ -134,6 +136,7 @@ class _SearchMusicAggregatorPageState extends State<SearchMusicAggregatorPage>

@override
Widget build(BuildContext context) {
final bool isMobile = Platform.isIOS || Platform.isAndroid;
final double screenHeight = MediaQuery.of(context).size.height;
final bool isDarkMode =
MediaQuery.of(context).platformBrightness == Brightness.dark;
Expand Down Expand Up @@ -179,11 +182,7 @@ class _SearchMusicAggregatorPageState extends State<SearchMusicAggregatorPage>
// 下面地方如果直接使用safeArea会ios上底部有一块空白
child: Column(
children: [
const SafeArea(
child: SizedBox(
height: 0,
width: 0,
)),
Padding(padding: EdgeInsets.only(top: isMobile ? 70 : 40)),
// 搜索框和过滤按钮
Padding(
padding: const EdgeInsets.only(top: 4.0, left: 8, right: 0),
Expand Down
6 changes: 1 addition & 5 deletions lib/pages/search_page/search_music_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ class _SearchMusicListState extends State<SearchMusicListPage>
// 下面地方如果直接使用safeArea会ios上底部有一块空白
child: Column(
children: [
const SafeArea(
child: SizedBox(
height: 0,
width: 0,
)),
Padding(padding: EdgeInsets.only(top: isMobile ? 70 : 40)),
Padding(
padding: EdgeInsets.only(
left: 8.0,
Expand Down

0 comments on commit 2f8520d

Please sign in to comment.