Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -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(),
),
),

View File

@@ -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,
),
};
}
}

View File

@@ -80,7 +80,7 @@ class PgcRankItem extends StatelessWidget {
value: item.stat!.follow,
),
],
)
),
],
),
),