center lock screen PIN page

This commit is contained in:
ryleedavis 2023-05-04 16:36:48 -06:00
parent 8d7db30328
commit 7c8b31dc4c

View file

@ -204,55 +204,56 @@ class _LockscreenViewState extends ConsumerState<LockscreenView> {
late Biometrics biometrics; late Biometrics biometrics;
Widget get _body => Background( Widget get _body => Background(
child: Scaffold( child: SafeArea(
backgroundColor: child: Scaffold(
Theme.of(context).extension<StackColors>()!.background, extendBodyBehindAppBar: true,
appBar: AppBar( backgroundColor:
leading: widget.showBackButton Theme.of(context).extension<StackColors>()!.background,
? AppBarBackButton( appBar: AppBar(
onPressed: () async { leading: widget.showBackButton
if (FocusScope.of(context).hasFocus) { ? AppBarBackButton(
FocusScope.of(context).unfocus(); onPressed: () async {
await Future<void>.delayed( if (FocusScope.of(context).hasFocus) {
const Duration(milliseconds: 70)); FocusScope.of(context).unfocus();
} await Future<void>.delayed(
if (mounted) { const Duration(milliseconds: 70));
Navigator.of(context).pop(); }
} if (mounted) {
}, Navigator.of(context).pop();
) }
: Container(), },
actions: [ )
// check prefs and hide if user has biometrics toggle off? : Container(),
Column( actions: [
mainAxisAlignment: MainAxisAlignment.center, // check prefs and hide if user has biometrics toggle off?
children: [ Column(
Padding( mainAxisAlignment: MainAxisAlignment.center,
padding: const EdgeInsets.only( children: [
right: 16.0, Padding(
padding: const EdgeInsets.only(
right: 16.0,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
if (ref
.read(prefsChangeNotifierProvider)
.useBiometrics ==
true)
CustomTextButton(
text: "Use biometrics",
onTap: () async {
await _checkUseBiometrics();
},
),
],
),
), ),
child: Row( ],
mainAxisAlignment: MainAxisAlignment.end, ),
children: [ ],
if (ref ),
.read(prefsChangeNotifierProvider) body: Column(
.useBiometrics ==
true)
CustomTextButton(
text: "Use biometrics",
onTap: () async {
await _checkUseBiometrics();
},
),
],
),
),
],
),
],
),
body: SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Shake( Shake(