opt: safearea

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-24 11:35:19 +08:00
parent 039e1696dd
commit 8c7001c801
8 changed files with 211 additions and 169 deletions

View File

@@ -170,7 +170,10 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
titleSpacing: automaticallyImplyLeading ? null : 12,
automaticallyImplyLeading: automaticallyImplyLeading,
),
body: VideoReplyReplyPanel(
body: SafeArea(
top: false,
bottom: false,
child: VideoReplyReplyPanel(
id: id,
oid: oid,
rpid: rpid,
@@ -179,6 +182,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
firstFloor: replyItem,
onDispose: onDispose,
),
),
);
if (this.context.orientation == Orientation.portrait) {
Get.to(

View File

@@ -92,7 +92,11 @@ class _HotPageState extends CommonPageState<HotPage, HotController>
Get.to(
Scaffold(
appBar: AppBar(title: const Text('排行榜')),
body: RankPage(),
body: SafeArea(
top: false,
bottom: false,
child: RankPage(),
),
),
);
}

View File

@@ -168,7 +168,10 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
titleSpacing: automaticallyImplyLeading ? null : 12,
automaticallyImplyLeading: automaticallyImplyLeading,
),
body: VideoReplyReplyPanel(
body: SafeArea(
top: false,
bottom: false,
child: VideoReplyReplyPanel(
id: id,
oid: oid,
rpid: rpid,
@@ -177,6 +180,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
firstFloor: replyItem,
onDispose: onDispose,
),
),
);
if (this.context.orientation == Orientation.portrait) {
Get.to(

View File

@@ -277,13 +277,15 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
() => Text('${controller.liveCount.value}人正在直播'),
),
),
body: CustomScrollView(
body: SafeArea(
top: false,
bottom: false,
child: CustomScrollView(
slivers: [
Obx(
() => _buildFollowListBody(controller.followListState.value),
),
Obx(() => _buildFollowListBody(controller.followListState.value)),
],
),
),
);
Widget _buildFollowListBody(LoadingState loadingState) {

View File

@@ -70,7 +70,10 @@ class _SeasonSeriesPageState extends State<SeasonSeriesPage>
appBar: AppBar(
title: Text(item['meta']['name']),
),
body: MemberVideo(
body: SafeArea(
top: false,
bottom: false,
child: MemberVideo(
type: isSeason
? ContributeType.season
: ContributeType.series,
@@ -81,6 +84,7 @@ class _SeasonSeriesPageState extends State<SeasonSeriesPage>
title: item['meta']['name'],
),
),
),
);
},
);

View File

@@ -54,12 +54,14 @@ class _SysMsgPageState extends State<SysMsgPage> {
Widget _buildBody(LoadingState<List<SystemNotifyList>?> loadingState) {
return switch (loadingState) {
Loading() => SliverList.builder(
Loading() => SliverSafeArea(
sliver: SliverList.builder(
itemCount: 12,
itemBuilder: (context, index) {
return const MsgFeedSysMsgSkeleton();
},
),
),
Success() => loadingState.response?.isNotEmpty == true
? SliverList.separated(
itemCount: loadingState.response!.length,

View File

@@ -1528,7 +1528,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
),
// 锁
Obx(
SafeArea(
child: Obx(
() => Visibility(
visible:
plPlayerController.videoType.value != 'live' && isFullScreen,
@@ -1549,8 +1550,9 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
plPlayerController.controlsLock.value
? FontAwesomeIcons.lock
: FontAwesomeIcons.lockOpen,
semanticLabel:
plPlayerController.controlsLock.value ? '解锁' : '锁定',
semanticLabel: plPlayerController.controlsLock.value
? '解锁'
: '锁定',
size: 15,
color: Colors.white,
),
@@ -1563,15 +1565,18 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
),
),
),
),
// 截图
Obx(
SafeArea(
child: Obx(
() => Align(
alignment: Alignment.centerRight,
child: FractionalTranslation(
translation: const Offset(-1, -0.4),
child: Visibility(
visible: plPlayerController.showControls.value && isFullScreen,
visible:
plPlayerController.showControls.value && isFullScreen,
child: DecoratedBox(
decoration: BoxDecoration(
color: const Color(0x45000000),
@@ -1645,6 +1650,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
),
),
),
),
Obx(() {
if (plPlayerController.dataStatus.loading ||

View File

@@ -133,7 +133,10 @@ class PiliScheme {
),
],
),
body: VideoReplyReplyPanel(
body: SafeArea(
top: false,
bottom: false,
child: VideoReplyReplyPanel(
oid: int.parse(oid),
rpid: rpid,
source: 'routePush',
@@ -145,6 +148,7 @@ class PiliScheme {
: null,
),
),
),
);
return true;
}
@@ -285,7 +289,10 @@ class PiliScheme {
),
],
),
body: VideoReplyReplyPanel(
body: SafeArea(
top: false,
bottom: false,
child: VideoReplyReplyPanel(
oid: oid,
rpid: rootId,
id: rpId,
@@ -294,6 +301,7 @@ class PiliScheme {
firstFloor: null,
),
),
),
);
return true;
} else if (path.startsWith("/msg_fold/")) {
@@ -331,7 +339,10 @@ class PiliScheme {
),
],
),
body: VideoReplyReplyPanel(
body: SafeArea(
top: false,
bottom: false,
child: VideoReplyReplyPanel(
oid: oid,
rpid: rpId,
source: 'routePush',
@@ -339,6 +350,7 @@ class PiliScheme {
firstFloor: null,
),
),
),
);
return true;
}
@@ -393,7 +405,10 @@ class PiliScheme {
),
],
),
body: VideoReplyReplyPanel(
body: SafeArea(
top: false,
bottom: false,
child: VideoReplyReplyPanel(
oid: oid ?? int.parse(dynId),
rpid: rpid,
source: 'routePush',
@@ -407,6 +422,7 @@ class PiliScheme {
: null,
),
),
),
);
}
return true;