mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-30 07:15:51 +08:00
@@ -64,8 +64,9 @@ class _RankPageState extends State<RankPage>
|
||||
flex: 1,
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 7),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 7,
|
||||
),
|
||||
child: Text(
|
||||
RankType.values[index].label,
|
||||
style: TextStyle(
|
||||
@@ -94,10 +95,12 @@ class _RankPageState extends State<RankPage>
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: _rankController.tabController,
|
||||
children: RankType.values
|
||||
.map((item) => ZonePage(
|
||||
rid: item.rid,
|
||||
seasonType: item.seasonType,
|
||||
))
|
||||
.map(
|
||||
(item) => ZonePage(
|
||||
rid: item.rid,
|
||||
seasonType: item.seasonType,
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -69,30 +69,31 @@ class _ZonePageState extends CommonPageState<ZonePage, ZoneController>
|
||||
Widget _buildBody(LoadingState<List<dynamic>?> loadingState) {
|
||||
return switch (loadingState) {
|
||||
Loading() => _buildSkeleton(),
|
||||
Success(:var response) => response?.isNotEmpty == true
|
||||
? SliverGrid(
|
||||
gridDelegate: Grid.videoCardHDelegate(context),
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final item = response[index];
|
||||
if (item is HotVideoItemModel) {
|
||||
return VideoCardH(
|
||||
videoItem: item,
|
||||
onRemove: () => controller.loadingState
|
||||
..value.data!.removeAt(index)
|
||||
..refresh(),
|
||||
);
|
||||
}
|
||||
return PgcRankItem(item: item);
|
||||
},
|
||||
childCount: response!.length,
|
||||
),
|
||||
)
|
||||
: HttpError(onReload: controller.onReload),
|
||||
Success(:var response) =>
|
||||
response?.isNotEmpty == true
|
||||
? SliverGrid(
|
||||
gridDelegate: Grid.videoCardHDelegate(context),
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final item = response[index];
|
||||
if (item is HotVideoItemModel) {
|
||||
return VideoCardH(
|
||||
videoItem: item,
|
||||
onRemove: () => controller.loadingState
|
||||
..value.data!.removeAt(index)
|
||||
..refresh(),
|
||||
);
|
||||
}
|
||||
return PgcRankItem(item: item);
|
||||
},
|
||||
childCount: response!.length,
|
||||
),
|
||||
)
|
||||
: HttpError(onReload: controller.onReload),
|
||||
Error(:var errMsg) => HttpError(
|
||||
errMsg: errMsg,
|
||||
onReload: controller.onReload,
|
||||
),
|
||||
errMsg: errMsg,
|
||||
onReload: controller.onReload,
|
||||
),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class PgcRankItem extends StatelessWidget {
|
||||
value: item.stat!.follow,
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user