feat(core): refonte architecture transverse (cache, network, websocket, DI)

- lib/app : app.dart, router mis à jour (routes nouveaux modules)
- lib/core/cache : cache_service + cached_datasource_decorator
- lib/core/network : api_client, offline_manager, retry_policy
- lib/core/websocket : websocket service (reconnexion exponentielle, heartbeat)
- lib/core/di : injection + register_module
- lib/core/storage : pending_operations_store (offline support)
- lib/core/navigation : main_navigation_layout (onglets par rôle)
- lib/core/config : environment, lcb_ft_constants
- lib/core/utils : error_formatter, validators
- pubspec.yaml/lock : dépendances mises à jour
This commit is contained in:
dahoud
2026-04-15 20:26:20 +00:00
parent 3a2c8a808f
commit 07b8488714
7 changed files with 145 additions and 19 deletions

View File

@@ -46,7 +46,13 @@ class UnionFlowApp extends StatelessWidget {
],
child: Consumer2<LocaleProvider, ThemeProvider>(
builder: (context, locale, theme, child) {
return MaterialApp(
return BlocListener<AuthBloc, AuthState>(
listenWhen: (prev, curr) =>
curr is AuthAuthenticated && prev is! AuthAuthenticated,
listener: (context, _) {
context.read<OrgSwitcherBloc>().add(const OrgSwitcherLoadRequested());
},
child: MaterialApp(
title: 'UnionFlow',
debugShowCheckedModeBanner: false,
scaffoldMessengerKey: UnionFlowApp.scaffoldMessengerKey,
@@ -79,7 +85,8 @@ class UnionFlowApp extends StatelessWidget {
child: child ?? const SizedBox(),
);
},
);
),
);
},
),
);