import 'package:flutter/material.dart'; import '../../../routes/app_routes.dart'; class HomeScreen extends StatelessWidget { const HomeScreen({super.key}); @override Widget build(BuildContext context) => Scaffold( appBar: AppBar( automaticallyImplyLeading: false, title: const Text('Accueil'), // Optionnel : Ajoutez un bouton de déconnexion actions: [ IconButton( icon: const Icon(Icons.logout), tooltip: 'Déconnexion', onPressed: () { // Navigue vers l'écran de login et supprime toutes les routes précédentes Navigator.of(context).pushNamedAndRemoveUntil( AppRoutes.login, (route) => false ); }, ) ], ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const Text( 'Vous êtes connecté !', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), const SizedBox(height: 40), ElevatedButton.icon( icon: const Icon(Icons.add_photo_alternate_outlined), label: const Text('Commencer une nouvelle publication'), onPressed: () { // Lance le parcours de création de post existant Navigator.of(context).pushNamed(AppRoutes.mediaPicker); }, style: ElevatedButton.styleFrom( padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12), ), ) ], ), ), ); }