import 'package:flutter/material.dart'; /// Widget réutilisable pour afficher un état vide (aucun élément) class EmptyState extends StatelessWidget { final IconData icon; final String title; final String? subtitle; final double iconSize; const EmptyState({ super.key, required this.icon, required this.title, this.subtitle, this.iconSize = 64, }); @override Widget build(BuildContext context) { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Icon(icon, size: iconSize, color: Colors.grey[400]), const SizedBox(height: 16), Text( title, style: TextStyle(fontSize: 18, color: Colors.grey[600]), ), if (subtitle != null) ...[ const SizedBox(height: 8), Text( subtitle!, style: TextStyle(fontSize: 14, color: Colors.grey[500]), ), ], ], ), ); } }