import 'package:flutter/material.dart'; /// Boutons d'action de l'écran game over : rejouer ou retourner au Pokédex. class GameOverActions extends StatelessWidget { final VoidCallback onTryAgain; final VoidCallback onBack; const GameOverActions({super.key, required this.onTryAgain, required this.onBack}); @override Widget build(BuildContext context) { return Column( children: [ _button(label: "TRY AGAIN", icon: Icons.refresh, color: const Color(0xFF2962FF), onPressed: onTryAgain), const SizedBox(height: 16), _button(label: "BACK TO POKEDEX", icon: Icons.menu_book, color: const Color(0xFFA66A00), onPressed: onBack), ], ); } Widget _button({ required String label, required IconData icon, required Color color, required VoidCallback onPressed, }) { return SizedBox( width: double.infinity, height: 60, child: ElevatedButton.icon( onPressed: onPressed, icon: Icon(icon, color: Colors.white, size: 24), label: Text( label, style: const TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold, letterSpacing: 2), ), style: ElevatedButton.styleFrom( backgroundColor: color, shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero), ), ), ); } }