import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import '../../../config/style.dart'; import '../../../utils/text_style.dart'; import '../../../utils/text_widget.dart'; class AddressSectionHeader extends StatelessWidget { final String iconPath; final String title; final Color? iconColor; const AddressSectionHeader({ Key? key, required this.iconPath, required this.title, this.iconColor, }) : super(key: key); @override Widget build(BuildContext context) { final wm = MediaQuery.of(context).size.width / 100; final hm = MediaQuery.of(context).size.height / 100; return Container( margin: EdgeInsets.symmetric(horizontal: wm * 5, vertical: hm * 1.5), child: Row( children: [ Container( width: hm * 2.5, height: hm * 2.5, decoration: BoxDecoration( color: (iconColor ?? Colors.blue).withOpacity(0.1), borderRadius: BorderRadius.circular(6), ), child: Center( child: iconPath.endsWith('.svg') ? SvgPicture.asset( iconPath, height: hm * 1.8, color: iconColor ?? Colors.blue, ) : Image.asset( iconPath, height: hm * 1.8, color: iconColor ?? Colors.blue, ), ), ), SizedBox(width: wm * 3), Txt( text: title, style: tS("Inter", 18, FontWeight.w600, Colors.black87), ), ], ), ); } }