fix login
This commit is contained in:
@@ -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),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user