fix(nav): supprimer onNavigate de DashboardDrawer et tous ses appelants
This commit is contained in:
@@ -20,7 +20,6 @@ class ActiveMemberDashboard extends StatelessWidget {
|
||||
backgroundColor: UnionFlowColors.background,
|
||||
appBar: _buildAppBar(),
|
||||
drawer: DashboardDrawer(
|
||||
onNavigate: (route) => Navigator.of(context).pushNamed(route),
|
||||
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
|
||||
),
|
||||
body: AfricanPatternBackground(
|
||||
|
||||
@@ -20,7 +20,6 @@ class ConsultantDashboard extends StatelessWidget {
|
||||
backgroundColor: UnionFlowColors.background,
|
||||
appBar: _buildAppBar(context),
|
||||
drawer: DashboardDrawer(
|
||||
onNavigate: (route) => Navigator.of(context).pushNamed(route),
|
||||
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
|
||||
),
|
||||
body: AfricanPatternBackground(
|
||||
|
||||
@@ -20,7 +20,6 @@ class HRManagerDashboard extends StatelessWidget {
|
||||
backgroundColor: UnionFlowColors.background,
|
||||
appBar: _buildAppBar(context),
|
||||
drawer: DashboardDrawer(
|
||||
onNavigate: (route) => Navigator.of(context).pushNamed(route),
|
||||
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
|
||||
),
|
||||
body: AfricanPatternBackground(
|
||||
|
||||
@@ -23,7 +23,6 @@ class ModeratorDashboard extends StatelessWidget {
|
||||
backgroundColor: UnionFlowColors.background,
|
||||
appBar: _buildAppBar(),
|
||||
drawer: DashboardDrawer(
|
||||
onNavigate: (route) => Navigator.of(context).pushNamed(route),
|
||||
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
|
||||
),
|
||||
body: AfricanPatternBackground(
|
||||
|
||||
@@ -26,7 +26,6 @@ class OrgAdminDashboard extends StatelessWidget {
|
||||
backgroundColor: UnionFlowColors.background,
|
||||
appBar: _buildAppBar(context),
|
||||
drawer: DashboardDrawer(
|
||||
onNavigate: (route) => Navigator.of(context).pushNamed(route),
|
||||
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
|
||||
),
|
||||
body: AfricanPatternBackground(
|
||||
|
||||
@@ -19,7 +19,6 @@ class SimpleMemberDashboard extends StatelessWidget {
|
||||
backgroundColor: UnionFlowColors.background,
|
||||
appBar: _buildAppBar(),
|
||||
drawer: DashboardDrawer(
|
||||
onNavigate: (route) => Navigator.of(context).pushNamed(route),
|
||||
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
|
||||
),
|
||||
body: AfricanPatternBackground(
|
||||
|
||||
@@ -21,7 +21,6 @@ class SuperAdminDashboard extends StatelessWidget {
|
||||
backgroundColor: UnionFlowColors.background,
|
||||
appBar: _buildAppBar(context),
|
||||
drawer: DashboardDrawer(
|
||||
onNavigate: (route) => Navigator.of(context).pushNamed(route),
|
||||
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
|
||||
),
|
||||
body: BlocBuilder<AuthBloc, AuthState>(
|
||||
|
||||
@@ -16,11 +16,9 @@ import '../../../about/presentation/pages/about_page.dart';
|
||||
/// Drawer principal — Mon Espace
|
||||
/// Profil · Notifications · Aide · À propos · Déconnexion
|
||||
class DashboardDrawer extends StatelessWidget {
|
||||
// ignore: unused_field
|
||||
final Function(String route)? onNavigate;
|
||||
final VoidCallback? onLogout;
|
||||
|
||||
const DashboardDrawer({super.key, this.onNavigate, this.onLogout});
|
||||
const DashboardDrawer({super.key, this.onLogout});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user