// ===== lib/widgets/wortis_logo.dart FONCTIONNEL ===== import 'package:flutter/material.dart'; class WortisLogoWidget extends StatelessWidget { final double size; final bool isWhite; final bool withShadow; final String? customPath; const WortisLogoWidget({ super.key, this.size = 100, this.isWhite = false, this.withShadow = true, this.customPath, }); @override Widget build(BuildContext context) { // Utilise exactement vos noms de fichiers String logoPath = customPath ?? (isWhite ? 'assets/images/wortis_logo_white.png' : 'assets/images/wortis_logo.png'); return Container( width: size, height: size, decoration: BoxDecoration( borderRadius: BorderRadius.circular(size * 0.15), boxShadow: withShadow ? [ BoxShadow( color: Colors.black.withOpacity(0.2), blurRadius: size * 0.1, offset: Offset(0, size * 0.05), spreadRadius: 1, ), ] : null, ), child: ClipRRect( borderRadius: BorderRadius.circular(size * 0.15), child: Image.asset( logoPath, width: size, height: size, fit: BoxFit.contain, errorBuilder: (context, error, stackTrace) { // Debug : Afficher l'erreur pour diagnostiquer print('Erreur chargement logo: $error'); print('Chemin tenté: $logoPath'); // Fallback avec le "W" stylisé return Container( width: size, height: size, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xFF006699), Color(0xFF0088CC)], ), borderRadius: BorderRadius.circular(size * 0.15), boxShadow: withShadow ? [ BoxShadow( color: Color(0xFF006699).withOpacity(0.3), blurRadius: size * 0.15, offset: Offset(0, size * 0.08), ), ] : null, ), ); }, ), ), ); } } /* DIAGNOSTIC : Si les images ne s'affichent toujours pas, vérifiez : 1. pubspec.yaml contient bien : flutter: assets: - assets/images/ 2. Redémarrez l'app complètement (hot restart, pas hot reload) 3. Dans votre terminal, exécutez : flutter clean flutter pub get flutter run 4. Vérifiez que les images sont bien au format PNG/JPG valide 5. Si ça ne marche toujours pas, essayez de renommer temporairement vos fichiers en : - logo1.png - logo2.png Et modifiez les chemins dans le code pour tester. */