From 3dab5db7c366850c5ae3b11cab00e12df32183a2 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sun, 25 May 2025 16:58:32 +0000 Subject: [PATCH] card --- lib/routes/organizationSetting.dart | 79 ++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/lib/routes/organizationSetting.dart b/lib/routes/organizationSetting.dart index e539f25..ac1c01d 100644 --- a/lib/routes/organizationSetting.dart +++ b/lib/routes/organizationSetting.dart @@ -166,8 +166,30 @@ class OrganizationSettingState extends State { )); } + // return Container( + // // color: Colors.white, + // padding: EdgeInsets.symmetric(vertical: 16, horizontal: 12), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // 'Organization Settings', + // style: GoogleFonts.poppins( + // fontSize: 15, + // fontWeight: FontWeight.w500, + // color: Colors.black87, + // ), + // ), + // SizedBox(height: 8), + // Divider(thickness: 0.2, color: Colors.blueGrey.shade100), + // SizedBox(height: 12), + // ...rows, // Spread operator to insert all row widgets + // ], + // ), + // ); + + return Container( - // color: Colors.white, padding: EdgeInsets.symmetric(vertical: 16, horizontal: 12), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -183,9 +205,62 @@ class OrganizationSettingState extends State { SizedBox(height: 8), Divider(thickness: 0.2, color: Colors.blueGrey.shade100), SizedBox(height: 12), - ...rows, // Spread operator to insert all row widgets + Wrap( + spacing: 16, // horizontal space between cards + runSpacing: 16, // vertical space between rows + children: menuItems.map((item) { + return SizedBox( + width: isDesktop ? 325 : double.infinity, + child: Card( + color: Colors.white, + child: InkWell( + onTap: () { + final route = item['value'] as String; + context.go(route); + }, + child: Padding( + padding: EdgeInsets.all(12), + child: Row( + children: [ + Icon(item['icon'], size: 40, color: Color(0xFF114D8B)), + SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + item['label'], + style: GoogleFonts.poppins( + fontSize: 14, + fontWeight: FontWeight.w500, + ), + ), + SizedBox(height: 4), + Text( + item['description'], + maxLines: 1, + overflow: TextOverflow.ellipsis, + softWrap: false, + style: TextStyle( + fontSize: 14, + color: Colors.grey[700], + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), + ); + }).toList(), + ), ], ), ); + } }