Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-06 10:17:47 +08:00
parent 381c385726
commit 631197e3b9
80 changed files with 987 additions and 3281 deletions

View File

@@ -65,13 +65,10 @@ class _MemberShopState extends State<MemberShop>
@override
bool get wantKeepAlive => true;
late double _maxWidth;
late final gridDelegate = SliverWaterfallFlowDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: Grid.smallCardWidth,
mainAxisSpacing: StyleString.safeSpace,
crossAxisSpacing: StyleString.safeSpace,
afterCalc: (value) => _maxWidth = value,
);
Widget _buildBody(LoadingState<List<SpaceShopItem>?> loadingState) {
@@ -92,10 +89,7 @@ class _MemberShopState extends State<MemberShop>
gridDelegate: gridDelegate,
delegate: SliverChildBuilderDelegate(
(_, index) {
return MemberShopItem(
item: response[index],
maxWidth: _maxWidth,
);
return MemberShopItem(item: response[index]);
},
childCount: response.length,
),