Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-27 20:54:41 +08:00
parent 25acf3a9bb
commit b51c646415
227 changed files with 768 additions and 764 deletions

View File

@@ -83,7 +83,7 @@ class _PgcPageState extends CommonPageState<PgcPage, PgcController>
LoadingState<List<TimelineResult>?> loadingState,
) => switch (loadingState) {
Loading() => loadingWidget,
Success(:var response) =>
Success(:final response) =>
response != null && response.isNotEmpty
? Builder(
builder: (context) {
@@ -189,7 +189,7 @@ class _PgcPageState extends CommonPageState<PgcPage, PgcController>
},
)
: const SizedBox.shrink(),
Error(:var errMsg) => GestureDetector(
Error(:final errMsg) => GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: controller.queryPgcTimeline,
child: Container(
@@ -310,7 +310,7 @@ class _PgcPageState extends CommonPageState<PgcPage, PgcController>
Widget _buildRcmdBody(LoadingState<List<PgcIndexItem>?> loadingState) {
return switch (loadingState) {
Loading() => const SliverToBoxAdapter(),
Success(:var response) =>
Success(:final response) =>
response != null && response.isNotEmpty
? SliverGrid.builder(
gridDelegate: gridDelegate,
@@ -323,7 +323,7 @@ class _PgcPageState extends CommonPageState<PgcPage, PgcController>
itemCount: response.length,
)
: HttpError(onReload: controller.onReload),
Error(:var errMsg) => HttpError(
Error(:final errMsg) => HttpError(
errMsg: errMsg,
onReload: controller.onReload,
),
@@ -397,7 +397,7 @@ class _PgcPageState extends CommonPageState<PgcPage, PgcController>
Widget _buildFollowBody(LoadingState<List<FavPgcItemModel>?> loadingState) {
return switch (loadingState) {
Loading() => loadingWidget,
Success(:var response) =>
Success(:final response) =>
response != null && response.isNotEmpty
? ListView.builder(
controller: controller.followController,
@@ -427,7 +427,7 @@ class _PgcPageState extends CommonPageState<PgcPage, PgcController>
'还没有${widget.tabType == HomeTabType.bangumi ? '追番' : '追剧'}',
),
),
Error(:var errMsg) => Container(
Error(:final errMsg) => Container(
padding: const EdgeInsets.symmetric(horizontal: 16),
alignment: Alignment.center,
child: Text(