Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #22 from langx:bug-badges-card-beyond-height-limit
Browse files Browse the repository at this point in the history
fix badges card beyond height limit
  • Loading branch information
xuelink authored Jun 24, 2024
2 parents 4650622 + 208660b commit 7080b42
Showing 1 changed file with 31 additions and 29 deletions.
60 changes: 31 additions & 29 deletions lib/components/profile_badges_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,38 @@ class BadgesCard extends StatelessWidget {
),
),
const SizedBox(height: 25),
GridView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
mainAxisSpacing: 16.0,
crossAxisSpacing: 16.0,
childAspectRatio: 0.75,
),
itemCount: badges.length,
itemBuilder: (context, index) {
return Column(
children: [
Image.asset(
badges[index]['image']!,
width: 60,
height: 60,
),
const SizedBox(height: 8),
Text(
badges[index]['label']!,
style: const TextStyle(
fontSize: 16,
color: Color(0xFF737373),
Expanded(
child: GridView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
mainAxisSpacing: 16.0,
crossAxisSpacing: 16.0,
childAspectRatio: 0.75,
),
itemCount: badges.length,
itemBuilder: (context, index) {
return Column(
children: [
Image.asset(
badges[index]['image']!,
width: 60,
height: 60,
),
textAlign: TextAlign.center,
),
],
);
},
const SizedBox(height: 8),
Text(
badges[index]['label']!,
style: const TextStyle(
fontSize: 16,
color: Color(0xFF737373),
),
textAlign: TextAlign.center,
),
],
);
},
),
),
],
),
Expand Down

0 comments on commit 7080b42

Please sign in to comment.