Video Upload
This commit is contained in:
@@ -33,6 +33,7 @@ class _SplashState extends ConsumerState<SplashScreen>
|
||||
if (!mounted) return;
|
||||
await Future.delayed(
|
||||
const Duration(milliseconds: 300)); // kleines Fade-Finish
|
||||
if (!mounted) return;
|
||||
context.go(authed ? '/igel' : '/login');
|
||||
}
|
||||
|
||||
|
||||
@@ -36,18 +36,20 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
||||
FilledButton(
|
||||
onPressed: busy
|
||||
? null
|
||||
: () async {
|
||||
setState(() => busy = true);
|
||||
try {
|
||||
await auth.login(emailC.text, passC.text);
|
||||
if (mounted) context.go('/igel');
|
||||
} catch (e) {
|
||||
setState(() => err = e.toString());
|
||||
} finally {
|
||||
if (mounted) setState(() => busy = false);
|
||||
}
|
||||
},
|
||||
child: const Text('Einloggen')),
|
||||
: () async {
|
||||
setState(() => busy = true);
|
||||
try {
|
||||
await auth.login(emailC.text, passC.text);
|
||||
if (!mounted) return;
|
||||
context.go('/igel');
|
||||
} catch (e) {
|
||||
if (!mounted) return;
|
||||
setState(() => err = e.toString());
|
||||
} finally {
|
||||
if (mounted) setState(() => busy = false);
|
||||
}
|
||||
},
|
||||
child: const Text('Einloggen')),
|
||||
TextButton(
|
||||
onPressed: () => context.go('/register'),
|
||||
child: const Text('Registrieren')),
|
||||
|
||||
@@ -63,8 +63,10 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
||||
setState(() => busy = true);
|
||||
try {
|
||||
await auth.register(email, pass);
|
||||
if (mounted) context.go('/login');
|
||||
if (!mounted) return;
|
||||
context.go('/login');
|
||||
} catch (e) {
|
||||
if (!mounted) return;
|
||||
setState(() => err = e.toString());
|
||||
} finally {
|
||||
if (mounted) setState(() => busy = false);
|
||||
@@ -82,4 +84,4 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user