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

@@ -85,9 +85,9 @@ class _MemberOpusState extends State<MemberOpus>
..onReload();
},
tileColor: e == _controller.type.value
? Theme.of(context)
.colorScheme
.onInverseSurface
? Theme.of(
context,
).colorScheme.onInverseSurface
: null,
dense: true,
title: Text(
@@ -117,34 +117,36 @@ class _MemberOpusState extends State<MemberOpus>
Widget _buildBody(LoadingState<List<SpaceOpusItemModel>?> loadingState) {
return switch (loadingState) {
Loading() => SliverWaterfallFlow.extent(
maxCrossAxisExtent: Grid.smallCardWidth,
mainAxisSpacing: StyleString.safeSpace,
crossAxisSpacing: StyleString.safeSpace,
children: List.generate(10, (_) => const SpaceOpusSkeleton()),
),
Success(:var response) => response?.isNotEmpty == true
? SliverWaterfallFlow.extent(
maxCrossAxisExtent: Grid.smallCardWidth,
mainAxisSpacing: StyleString.safeSpace,
crossAxisSpacing: StyleString.safeSpace,
lastChildLayoutTypeBuilder: (index) {
if (index == response.length - 1) {
_controller.onLoadMore();
}
return index == response.length
? LastChildLayoutType.foot
: LastChildLayoutType.none;
},
children:
response!.map((item) => SpaceOpusItem(item: item)).toList(),
)
: HttpError(
onReload: _controller.onReload,
),
maxCrossAxisExtent: Grid.smallCardWidth,
mainAxisSpacing: StyleString.safeSpace,
crossAxisSpacing: StyleString.safeSpace,
children: List.generate(10, (_) => const SpaceOpusSkeleton()),
),
Success(:var response) =>
response?.isNotEmpty == true
? SliverWaterfallFlow.extent(
maxCrossAxisExtent: Grid.smallCardWidth,
mainAxisSpacing: StyleString.safeSpace,
crossAxisSpacing: StyleString.safeSpace,
lastChildLayoutTypeBuilder: (index) {
if (index == response.length - 1) {
_controller.onLoadMore();
}
return index == response.length
? LastChildLayoutType.foot
: LastChildLayoutType.none;
},
children: response!
.map((item) => SpaceOpusItem(item: item))
.toList(),
)
: HttpError(
onReload: _controller.onReload,
),
Error(:var errMsg) => HttpError(
errMsg: errMsg,
onReload: _controller.onReload,
),
errMsg: errMsg,
onReload: _controller.onReload,
),
};
}