L'authentification Keycloak WebView est maintenant 100% fonctionnelle avec navigation automatique vers le dashboard !
This commit is contained in:
@@ -74,22 +74,29 @@ class UnionFlowApp extends StatelessWidget {
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
|
||||
// Page d'accueil avec authentification
|
||||
home: BlocBuilder<AuthBloc, AuthState>(
|
||||
builder: (context, state) {
|
||||
if (state is AuthLoading) {
|
||||
return const Scaffold(
|
||||
body: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
} else if (state is AuthAuthenticated) {
|
||||
return const AdaptiveDashboardPage();
|
||||
} else {
|
||||
return const LoginPage();
|
||||
}
|
||||
},
|
||||
),
|
||||
// Configuration des routes
|
||||
routes: {
|
||||
'/': (context) => BlocBuilder<AuthBloc, AuthState>(
|
||||
builder: (context, state) {
|
||||
if (state is AuthLoading) {
|
||||
return const Scaffold(
|
||||
body: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
} else if (state is AuthAuthenticated) {
|
||||
return const AdaptiveDashboardPage();
|
||||
} else {
|
||||
return const LoginPage();
|
||||
}
|
||||
},
|
||||
),
|
||||
'/dashboard': (context) => const AdaptiveDashboardPage(),
|
||||
'/login': (context) => const LoginPage(),
|
||||
},
|
||||
|
||||
// Page d'accueil par défaut
|
||||
initialRoute: '/',
|
||||
|
||||
// Builder global pour gérer les erreurs
|
||||
builder: (context, child) {
|
||||
|
||||
Reference in New Issue
Block a user