fix
This commit is contained in:
@@ -41,24 +41,41 @@ class QuickActionSection extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
return Container(
|
||||
margin: const EdgeInsets.only(bottom: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.07),
|
||||
blurRadius: 15,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 16,
|
||||
children: [
|
||||
// Section Title
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF212121), // --text-dark
|
||||
height: 1.0, // Reduce line height to minimize spacing
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// Action Grid
|
||||
_buildActionGrid(),
|
||||
// Action Grid (always 3 columns to match HTML)
|
||||
// Using Transform to remove spacing between title and grid
|
||||
Transform.translate(
|
||||
offset: const Offset(0, -4),
|
||||
child: _buildActionGrid(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -66,17 +83,15 @@ class QuickActionSection extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildActionGrid() {
|
||||
// Determine grid layout based on number of items
|
||||
final int crossAxisCount = actions.length <= 2 ? 2 : 3;
|
||||
|
||||
return GridView.builder(
|
||||
padding: EdgeInsets.zero, // Remove default GridView padding
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: crossAxisCount,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, // Always 3 columns to match HTML
|
||||
childAspectRatio: 1.0,
|
||||
crossAxisSpacing: 4,
|
||||
mainAxisSpacing: 4,
|
||||
crossAxisSpacing: 8,
|
||||
mainAxisSpacing: 8,
|
||||
),
|
||||
itemCount: actions.length,
|
||||
itemBuilder: (context, index) {
|
||||
|
||||
Reference in New Issue
Block a user