fix login

This commit is contained in:
davmar
2026-09-10 10:51:45 +02:00
parent 79e4417edb
commit 56cc0fc94c
6 changed files with 269 additions and 182 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
/// First route shown after launch. Hands off to [MainShell] after a short delay.
/// First route shown after launch. Hands off to [AuthGate] after a short delay.
library;
import 'package:flutter/material.dart';
import '../utils/constants.dart';
import 'main_shell.dart';
import 'auth_gate.dart';
/// Branded splash with a fade-in logo. Replaced by the bottom-nav shell.
/// Branded splash with a fade-in logo. Replaced by the auth gate.
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@@ -32,17 +32,17 @@ class _SplashScreenState extends State<SplashScreen>
CurvedAnimation(parent: _controller, curve: Curves.easeOutBack),
);
_controller.forward();
_goToShell();
_goToAuthGate();
}
Future<void> _goToShell() async {
Future<void> _goToAuthGate() async {
await Future<void>.delayed(kSplashDuration);
if (!mounted) return;
Navigator.of(context).pushReplacement(
PageRouteBuilder<void>(
pageBuilder: (_, animation, _) => FadeTransition(
opacity: animation,
child: const MainShell(),
child: const AuthGate(),
),
transitionDuration: const Duration(milliseconds: 400),
),