fix: Incorrect routing login/lock screen

This commit is contained in:
PartyDonut 2025-08-15 09:59:03 +02:00
parent b9e817d582
commit 8ec4c79ad3
2 changed files with 3 additions and 2 deletions

View file

@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:auto_route/auto_route.dart';
import 'package:iconsax_plus/iconsax_plus.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:iconsax_plus/iconsax_plus.dart';
import 'package:fladder/models/account_model.dart';
import 'package:fladder/providers/user_provider.dart';
@ -105,7 +105,7 @@ class _LockScreenState extends ConsumerState<LockScreen> with WidgetsBindingObse
tooltip: context.localized.login,
onPressed: () {
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
context.router.push(const LoginRoute());
context.router.replaceAll([const LoginRoute()]);
},
child: const Icon(IconsaxPlusLinear.arrow_swap_horizontal),
),

View file

@ -91,6 +91,7 @@ class _LoginPageState extends ConsumerState<LoginScreen> {
FloatingActionButton(
key: const Key("edit_button"),
heroTag: "edit_button",
backgroundColor: editingUsers ? Theme.of(context).colorScheme.errorContainer : null,
child: const Icon(IconsaxPlusLinear.edit_2),
onPressed: () => setState(() => editingUsers = !editingUsers),
),