Split welcome and add authview

This commit is contained in:
2026-01-19 11:14:50 +01:00
parent 36af248069
commit 8de8cc2283
4 changed files with 177 additions and 127 deletions

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../services/authentication_manager.dart';
import 'welcome_view.dart';
import 'auth_view.dart';
import 'main_view.dart';
class ContentView extends StatelessWidget {
@@ -11,10 +12,16 @@ class ContentView extends StatelessWidget {
Widget build(BuildContext context) {
final authManager = context.watch<AuthenticationManager>();
// Show splash screen while initializing
if (authManager.isInitializing) {
return const WelcomeView();
}
// Show main view if authenticated, otherwise show login
if (authManager.isAuthenticated) {
return const MainView();
} else {
return const WelcomeView();
return const AuthView();
}
}
}