mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:PiliPlus/common/skeleton/video_card_h.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models/common/member/contribute_type.dart';
|
||||
import 'package:PiliPlus/models/member_ss/season.dart' show MemberSsModel;
|
||||
import 'package:PiliPlus/pages/member_season_series/controller.dart';
|
||||
import 'package:PiliPlus/pages/member_season_series/widget/season_series_card.dart';
|
||||
import 'package:PiliPlus/pages/member_video/view.dart';
|
||||
@@ -52,7 +53,7 @@ class _SeasonSeriesPageState extends State<SeasonSeriesPage>
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBody(LoadingState<List<dynamic>?> loadingState) {
|
||||
Widget _buildBody(LoadingState<List<MemberSsModel>?> loadingState) {
|
||||
return switch (loadingState) {
|
||||
Loading() => SliverGrid(
|
||||
gridDelegate: Grid.videoCardHDelegate(context),
|
||||
@@ -71,18 +72,17 @@ class _SeasonSeriesPageState extends State<SeasonSeriesPage>
|
||||
if (index == response.length - 1) {
|
||||
_controller.onLoadMore();
|
||||
}
|
||||
dynamic item = response[index];
|
||||
MemberSsModel item = response[index];
|
||||
return SeasonSeriesCard(
|
||||
item: item,
|
||||
onTap: () {
|
||||
bool isSeason = item['meta']['season_id'] != null;
|
||||
dynamic id = isSeason
|
||||
? item['meta']['season_id']
|
||||
: item['meta']['series_id'];
|
||||
bool isSeason = item.meta!.seasonId != null;
|
||||
dynamic id =
|
||||
isSeason ? item.meta!.seasonId : item.meta!.seriesId;
|
||||
Get.to(
|
||||
Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(item['meta']['name']),
|
||||
title: Text(item.meta!.name!),
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
@@ -95,7 +95,7 @@ class _SeasonSeriesPageState extends State<SeasonSeriesPage>
|
||||
mid: widget.mid,
|
||||
seasonId: isSeason ? id : null,
|
||||
seriesId: isSeason ? null : id,
|
||||
title: item['meta']['name'],
|
||||
title: item.meta!.name,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -106,9 +106,7 @@ class _SeasonSeriesPageState extends State<SeasonSeriesPage>
|
||||
childCount: response!.length,
|
||||
),
|
||||
)
|
||||
: HttpError(
|
||||
onReload: _controller.onReload,
|
||||
),
|
||||
: HttpError(onReload: _controller.onReload),
|
||||
Error(:var errMsg) => HttpError(
|
||||
errMsg: errMsg,
|
||||
onReload: _controller.onReload,
|
||||
|
||||
Reference in New Issue
Block a user