mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
Fixed dashboard navigation
This commit is contained in:
parent
0c60501a99
commit
249bd685b1
3 changed files with 6 additions and 4 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue