import 'package:flutter/material.dart'; /// Widget réutilisable pour afficher une puce d'information avec icône et texte class InfoChip extends StatelessWidget { final String label; final Widget icon; final Color? backgroundColor; final Color? textColor; final double fontSize; final EdgeInsets padding; const InfoChip({ super.key, required this.label, required this.icon, this.backgroundColor, this.textColor, this.fontSize = 12, this.padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4), }); @override Widget build(BuildContext context) { return Container( padding: padding, decoration: BoxDecoration( color: backgroundColor ?? Colors.grey.shade100, borderRadius: BorderRadius.circular(12), ), child: Row( mainAxisSize: MainAxisSize.min, children: [ icon, const SizedBox(width: 4), Text( label, style: TextStyle( fontSize: fontSize, color: textColor ?? Colors.grey.shade700, ), ), ], ), ); } }