opt: common ctr

opt: state

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-11 12:21:42 +08:00
parent 5bff1747e6
commit 574bf861f0
129 changed files with 1065 additions and 1058 deletions

View File

@@ -74,7 +74,7 @@ class _MemberLikePageState extends State<MemberLikePage> {
return const VideoCardVSkeleton();
},
),
Success() => loadingState.response?.isNotEmpty == true
Success(:var response) => response?.isNotEmpty == true
? SliverGrid.builder(
gridDelegate: SliverGridDelegateWithExtentAndRatio(
mainAxisSpacing: StyleString.cardSpace,
@@ -83,14 +83,14 @@ class _MemberLikePageState extends State<MemberLikePage> {
childAspectRatio: StyleString.aspectRatio,
mainAxisExtent: MediaQuery.textScalerOf(context).scale(75),
),
itemCount: loadingState.response!.length,
itemCount: response!.length,
itemBuilder: (context, index) {
return MemberCoinsItem(coinItem: loadingState.response![index]);
return MemberCoinsItem(coinItem: response[index]);
},
)
: HttpError(onReload: _ctr.onReload),
Error() => HttpError(
errMsg: loadingState.errMsg,
Error(:var errMsg) => HttpError(
errMsg: errMsg,
onReload: _ctr.onReload,
),
};