mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: safearea
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -51,30 +51,33 @@ class _PgcIndexPageState extends State<PgcIndexPage>
|
||||
int count = (data.order?.isNotEmpty == true ? 1 : 0) +
|
||||
(data.filter?.length ?? 0);
|
||||
if (count == 0) return const SizedBox.shrink();
|
||||
return CustomScrollView(
|
||||
slivers: [
|
||||
if (widget.indexType != null)
|
||||
SliverToBoxAdapter(child: const SizedBox(height: 12)),
|
||||
SliverToBoxAdapter(
|
||||
child: AnimatedSize(
|
||||
curve: Curves.easeInOut,
|
||||
alignment: Alignment.topCenter,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: count > 5
|
||||
? Obx(() => _buildSortWidget(count, data))
|
||||
: _buildSortWidget(count, data),
|
||||
return SafeArea(
|
||||
bottom: false,
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
if (widget.indexType != null)
|
||||
SliverToBoxAdapter(child: const SizedBox(height: 12)),
|
||||
SliverToBoxAdapter(
|
||||
child: AnimatedSize(
|
||||
curve: Curves.easeInOut,
|
||||
alignment: Alignment.topCenter,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: count > 5
|
||||
? Obx(() => _buildSortWidget(count, data))
|
||||
: _buildSortWidget(count, data),
|
||||
),
|
||||
),
|
||||
),
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
left: StyleString.safeSpace,
|
||||
right: StyleString.safeSpace,
|
||||
top: 12,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
left: StyleString.safeSpace,
|
||||
right: StyleString.safeSpace,
|
||||
top: 12,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||
),
|
||||
sliver: Obx(() => _buildList(_ctr.loadingState.value)),
|
||||
),
|
||||
sliver: Obx(() => _buildList(_ctr.loadingState.value)),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
Error() => scrollErrorWidget(
|
||||
|
||||
@@ -248,10 +248,14 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
|
||||
length: types.length,
|
||||
child: Column(
|
||||
children: [
|
||||
TabBar(
|
||||
tabs: titles
|
||||
.map((title) => Tab(text: title))
|
||||
.toList()),
|
||||
SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: TabBar(
|
||||
tabs: titles
|
||||
.map((title) => Tab(text: title))
|
||||
.toList()),
|
||||
),
|
||||
Expanded(
|
||||
child: tabBarView(
|
||||
children: types
|
||||
|
||||
Reference in New Issue
Block a user