mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 17:55:58 -07: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() {
|
void loggedInGoToHome() {
|
||||||
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
|
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
|
||||||
if (context.mounted) {
|
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) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final padding = MediaQuery.of(context).padding;
|
final padding = MediaQuery.of(context).padding;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AdaptiveLayout.of(context).isDesktop ? Colors.transparent : null,
|
backgroundColor: AdaptiveLayout.of(context).size == ScreenLayout.dual ? Colors.transparent : null,
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||||
floatingActionButton: floatingActionButton,
|
floatingActionButton: floatingActionButton,
|
||||||
body: Column(
|
body: Column(
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
|
||||||
scrollController: scrollController,
|
scrollController: scrollController,
|
||||||
showUserIcon: true,
|
showUserIcon: true,
|
||||||
items: [
|
items: [
|
||||||
if (context.router.canPop() && AdaptiveLayout.of(context).size == ScreenLayout.single)
|
if (context.router.canPop() && AdaptiveLayout.of(context).size == ScreenLayout.dual)
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -205,7 +205,9 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await ref.read(authProvider.notifier).logOutUser();
|
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),
|
child: Text(context.localized.logout),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue