Skip to content

Commit

Permalink
fix: menu use flex expanded wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
yosokim committed Oct 31, 2022
1 parent f289b87 commit 41777c7
Showing 1 changed file with 21 additions and 28 deletions.
49 changes: 21 additions & 28 deletions lib/pages/entry_point.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,42 +316,35 @@ class _PointerPageViewState extends State<PointerPageView> {
),
child: Container(
width: double.infinity,
height: 80,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
),
padding: const EdgeInsets.symmetric(
vertical: 12.0,
),
child: GridView.builder(
itemCount: tabs.length,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
// childAspectRatio: 0.75,
),
itemBuilder: (context, index) {
var curr = tabs[index];
return Column(
children: [
Image.asset(
"assets/stay/logo/$curr.png",
width: 32,
height: 32,
fit: BoxFit.cover,
),
const SizedBox(height: 4.2),
Text(
curr,
style: const TextStyle(
fontSize: 14.0,
child: Flex(
direction: Axis.horizontal,
children: tabs.map((e) => Expanded(
flex: 1,
child: Column(
children: [
Image.asset(
"assets/stay/logo/$e.png",
width: 32,
height: 32,
fit: BoxFit.cover,
),
),
],
);
},
const SizedBox(height: 4.2),
Text(
e,
style: const TextStyle(
fontSize: 14.0,
),
),
],
),
)).toList(),
),
),
),
Expand Down

0 comments on commit 41777c7

Please sign in to comment.