Fixed dashboard navigation

This commit is contained in:
PartyDonut 2024-10-05 19:15:31 +02:00
parent 0c60501a99
commit 249bd685b1
3 changed files with 6 additions and 4 deletions

View file

@ -211,7 +211,7 @@ class _LoginPageState extends ConsumerState<LoginScreen> {
void loggedInGoToHome() {
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
if (context.mounted) {
context.router.push(const DashboardRoute());
context.router.navigate(const DashboardRoute());
}
}

View file

@ -27,7 +27,7 @@ class SettingsScaffold extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final padding = MediaQuery.of(context).padding;
return Scaffold(
backgroundColor: AdaptiveLayout.of(context).isDesktop ? Colors.transparent : null,
backgroundColor: AdaptiveLayout.of(context).size == ScreenLayout.dual ? Colors.transparent : null,
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: floatingActionButton,
body: Column(

View file

@ -90,7 +90,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
scrollController: scrollController,
showUserIcon: true,
items: [
if (context.router.canPop() && AdaptiveLayout.of(context).size == ScreenLayout.single)
if (context.router.canPop() && AdaptiveLayout.of(context).size == ScreenLayout.dual)
Align(
alignment: Alignment.centerLeft,
child: Padding(
@ -205,7 +205,9 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
),
onPressed: () async {
await ref.read(authProvider.notifier).logOutUser();
if (context.mounted) context.router.navigate(const LoginRoute());
if (context.mounted) {
context.router.navigate(const LoginRoute());
}
},
child: Text(context.localized.logout),
),