32 lines
815 B
Dart
32 lines
815 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import '../providers/auth_provider.dart';
|
|
|
|
class DashboardScreen extends StatelessWidget {
|
|
const DashboardScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final auth = context.watch<AuthProvider>();
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Tableau de bord'),
|
|
actions: [
|
|
IconButton(
|
|
icon: const Icon(Icons.logout),
|
|
onPressed: () async {
|
|
await auth.logout();
|
|
if (context.mounted) context.go('/login');
|
|
},
|
|
),
|
|
],
|
|
),
|
|
body: const Center(
|
|
child: Text('Dashboard — en cours de développement'),
|
|
),
|
|
);
|
|
}
|
|
}
|