mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
feature(Lock-screen): Replaced login button with a floating action button (#103)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
76ac1aaa5b
commit
0761a50bfa
1 changed files with 21 additions and 19 deletions
|
|
@ -101,37 +101,39 @@ class _LockScreenState extends ConsumerState<LockScreen> with WidgetsBindingObse
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
tooltip: context.localized.login,
|
||||||
|
onPressed: () {
|
||||||
|
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
|
||||||
|
context.router.push(const LoginRoute());
|
||||||
|
},
|
||||||
|
child: const Icon(IconsaxOutline.arrow_swap_horizontal),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
crossAxisAlignment: WrapCrossAlignment.center,
|
crossAxisAlignment: WrapCrossAlignment.center,
|
||||||
alignment: WrapAlignment.center,
|
alignment: WrapAlignment.center,
|
||||||
runAlignment: WrapAlignment.center,
|
runAlignment: WrapAlignment.center,
|
||||||
|
direction: Axis.vertical,
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const Icon(
|
||||||
IconsaxOutline.lock_1,
|
IconsaxOutline.lock_1,
|
||||||
size: 38,
|
size: 38,
|
||||||
),
|
),
|
||||||
ConstrainedBox(
|
if (user != null)
|
||||||
constraints: const BoxConstraints(
|
ConstrainedBox(
|
||||||
maxHeight: 400,
|
constraints: const BoxConstraints(
|
||||||
maxWidth: 400,
|
maxHeight: 400,
|
||||||
),
|
maxWidth: 400,
|
||||||
child: Padding(
|
),
|
||||||
padding: const EdgeInsets.all(64.0),
|
child: Padding(
|
||||||
child: LoginIcon(
|
padding: const EdgeInsets.all(64.0),
|
||||||
user: user!,
|
child: LoginIcon(
|
||||||
onPressed: () => tapLoggedInAccount(user),
|
user: user,
|
||||||
|
onPressed: () => tapLoggedInAccount(user),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
ElevatedButton.icon(
|
|
||||||
onPressed: () {
|
|
||||||
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
|
|
||||||
context.router.push(const LoginRoute());
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.login_rounded),
|
|
||||||
label: Text(context.localized.login),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue