import 'package:flutter/material.dart'; import '../pokemon_image.dart'; /// Bloc supérieur de l'écran game over : bannière "GAME OVER", image et nom du Pokémon. class GameOverHeader extends StatelessWidget { final String pokemonImage; final String pokemonName; const GameOverHeader({super.key, required this.pokemonImage, required this.pokemonName}); static const _darkRed = Color(0xFF9E1B1B); static const _silverBg = Color(0xFFC8D1D8); @override Widget build(BuildContext context) { return Container( decoration: BoxDecoration(color: _darkRed, border: Border.all(color: _darkRed, width: 4)), child: Container( width: double.infinity, padding: const EdgeInsets.symmetric(vertical: 32, horizontal: 16), color: _silverBg, child: Column( children: [ Container( color: _darkRed, padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8), child: const Text( "GAME OVER", style: TextStyle( fontSize: 26, color: Colors.yellow, fontWeight: FontWeight.bold, letterSpacing: 2, shadows: [Shadow(offset: Offset(1.5, 1.5), color: Colors.black)], ), ), ), const SizedBox(height: 16), if (pokemonImage.isNotEmpty) SizedBox(height: 140, child: PokemonImage(imageUrl: pokemonImage, fit: BoxFit.contain)), const SizedBox(height: 12), Text( "It was $pokemonName!", textAlign: TextAlign.center, style: const TextStyle( fontSize: 22, fontWeight: FontWeight.bold, color: Color(0xFF1B2333), letterSpacing: 1, ), ), const SizedBox(height: 8), ], ), ), ); } }