mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: fav detail page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -242,22 +242,23 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
return loadingState is Success
|
return loadingState is Success
|
||||||
? loadingState.response.isEmpty
|
? loadingState.response.isEmpty
|
||||||
? const SliverToBoxAdapter(child: SizedBox())
|
? const SliverToBoxAdapter(child: SizedBox())
|
||||||
: SliverGrid(
|
: SliverPadding(
|
||||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
padding: EdgeInsets.only(
|
||||||
mainAxisSpacing: StyleString.cardSpace,
|
bottom: MediaQuery.of(context).padding.bottom),
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
sliver: SliverGrid(
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||||
childAspectRatio: StyleString.aspectRatio * 2.4,
|
mainAxisSpacing: StyleString.cardSpace,
|
||||||
mainAxisExtent: 0,
|
crossAxisSpacing: StyleString.safeSpace,
|
||||||
),
|
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||||
delegate: SliverChildBuilderDelegate(
|
childAspectRatio: StyleString.aspectRatio * 2.4,
|
||||||
(context, index) {
|
mainAxisExtent: 0,
|
||||||
if (index == loadingState.response.length) {
|
),
|
||||||
return Container(
|
delegate: SliverChildBuilderDelegate(
|
||||||
height: MediaQuery.of(context).padding.bottom + 60,
|
(context, index) {
|
||||||
padding: EdgeInsets.only(
|
if (index == loadingState.response.length) {
|
||||||
bottom: MediaQuery.of(context).padding.bottom),
|
return Container(
|
||||||
child: Center(
|
height: 60,
|
||||||
|
alignment: Alignment.center,
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() => Text(
|
() => Text(
|
||||||
_favDetailController.loadingText.value,
|
_favDetailController.loadingText.value,
|
||||||
@@ -266,16 +267,16 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
fontSize: 13),
|
fontSize: 13),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
|
}
|
||||||
|
return FavVideoCardH(
|
||||||
|
videoItem: loadingState.response[index],
|
||||||
|
callFn: () => _favDetailController
|
||||||
|
.onCancelFav(loadingState.response[index].id),
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
return FavVideoCardH(
|
childCount: loadingState.response.length + 1,
|
||||||
videoItem: loadingState.response[index],
|
),
|
||||||
callFn: () => _favDetailController
|
|
||||||
.onCancelFav(loadingState.response[index].id),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
childCount: loadingState.response.length + 1,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: loadingState is Error
|
: loadingState is Error
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ class FavVideoCardH extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(
|
padding:
|
||||||
StyleString.safeSpace, 5, StyleString.safeSpace, 5),
|
const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, boxConstraints) {
|
builder: (context, boxConstraints) {
|
||||||
double width =
|
double width =
|
||||||
|
|||||||
Reference in New Issue
Block a user