import 'package:flutter/material.dart'; class CustomInfoCard extends StatelessWidget { final String imagePath; final String title; final String subtitle; const CustomInfoCard({ super.key, required this.imagePath, required this.title, required this.subtitle, }); @override Widget build(BuildContext context) { return SizedBox( width: double.infinity, // Takes full width of parent height: 130, // Fixed height, adjust as needed child: Card( margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30), ), color: const Color.fromARGB(255, 254, 242, 221), child: Padding( padding: const EdgeInsets.only(right: 8), child: Row( children: [ Container( width: 90, // Fixed width to match the height (110 - 16 * 2) height: 90, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(36), ), child: ClipRRect( borderRadius: BorderRadius.circular(36), child: Image.asset( imagePath, fit: BoxFit.cover, width: 90, height: 90, ), ), ), const SizedBox(width: 16), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( title, style: const TextStyle( fontSize: 16, fontWeight: FontWeight.bold, ), ), const SizedBox(height: 4), Text( subtitle, style: TextStyle( fontSize: 14, color: Colors.grey[600], ), ), ], ), ), ], ), ), ), ); } }