From a295f368b1a707ce14f38e3905dba19170f2b198 Mon Sep 17 00:00:00 2001 From: Reynir Date: Tue, 20 Jul 2021 10:32:26 +0000 Subject: [PATCH 1/6] add canPop() condition --- lib/passcode_screen.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/passcode_screen.dart b/lib/passcode_screen.dart index 9ea0333..028067b 100644 --- a/lib/passcode_screen.dart +++ b/lib/passcode_screen.dart @@ -259,7 +259,9 @@ class _PasscodeScreenState extends State _showValidation(bool isValid) { if (isValid) { - Navigator.maybePop(context).then((pop) => _validationCallback()); + if (Navigator.canPop(context)) { + Navigator.maybePop(context).then((pop) => _validationCallback()); + } } else { controller.forward(); } From 15b829bca2026770802eefcc5faf5a7619d7512d Mon Sep 17 00:00:00 2001 From: Reynir Date: Tue, 27 Jul 2021 14:05:18 +0000 Subject: [PATCH 2/6] Update passcode_screen.dart --- lib/passcode_screen.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/passcode_screen.dart b/lib/passcode_screen.dart index 028067b..537853c 100644 --- a/lib/passcode_screen.dart +++ b/lib/passcode_screen.dart @@ -28,6 +28,7 @@ class PasscodeScreen extends StatefulWidget { final CancelCallback? cancelCallback; final Color? backgroundColor; + final AppBar? appBar; final Widget? bottomWidget; final List? digits; @@ -44,6 +45,7 @@ class PasscodeScreen extends StatefulWidget { KeyboardUIConfig? keyboardUIConfig, this.bottomWidget, this.backgroundColor, + this.appBar, this.cancelCallback, this.digits, }) : circleUIConfig = circleUIConfig ?? const CircleUIConfig(), @@ -89,6 +91,7 @@ class _PasscodeScreenState extends State @override Widget build(BuildContext context) { return Scaffold( + appBar: widget.appBar ?? null, backgroundColor: widget.backgroundColor ?? Colors.black.withOpacity(0.8), body: SafeArea( child: OrientationBuilder( From 679b0cead9599e900c1d8ce73db9f569e8ff6782 Mon Sep 17 00:00:00 2001 From: Reynir Date: Tue, 27 Jul 2021 14:15:06 +0000 Subject: [PATCH 3/6] Update passcode_screen.dart --- lib/passcode_screen.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/passcode_screen.dart b/lib/passcode_screen.dart index 537853c..9a3c69b 100644 --- a/lib/passcode_screen.dart +++ b/lib/passcode_screen.dart @@ -29,6 +29,7 @@ class PasscodeScreen extends StatefulWidget { final Color? backgroundColor; final AppBar? appBar; + final double? circleHeight; final Widget? bottomWidget; final List? digits; @@ -46,6 +47,7 @@ class PasscodeScreen extends StatefulWidget { this.bottomWidget, this.backgroundColor, this.appBar, + this.circleHeight, this.cancelCallback, this.digits, }) : circleUIConfig = circleUIConfig ?? const CircleUIConfig(), @@ -115,7 +117,7 @@ class _PasscodeScreenState extends State widget.title, Container( margin: const EdgeInsets.only(top: 20), - height: 40, + height: circleHeight ?? 40, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: _buildCircles(), @@ -157,7 +159,7 @@ class _PasscodeScreenState extends State widget.title, Container( margin: const EdgeInsets.only(top: 20), - height: 40, + height: circleHeight ?? 40, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: _buildCircles(), From 1f512666056e1a5ca34ad932b1db23eb413db60b Mon Sep 17 00:00:00 2001 From: Reynir Date: Tue, 27 Jul 2021 14:25:33 +0000 Subject: [PATCH 4/6] Update passcode_screen.dart --- lib/passcode_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/passcode_screen.dart b/lib/passcode_screen.dart index 9a3c69b..e2a54e7 100644 --- a/lib/passcode_screen.dart +++ b/lib/passcode_screen.dart @@ -117,7 +117,7 @@ class _PasscodeScreenState extends State widget.title, Container( margin: const EdgeInsets.only(top: 20), - height: circleHeight ?? 40, + height: widget.circleHeight ?? 40, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: _buildCircles(), @@ -159,7 +159,7 @@ class _PasscodeScreenState extends State widget.title, Container( margin: const EdgeInsets.only(top: 20), - height: circleHeight ?? 40, + height: widget.circleHeight ?? 40, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: _buildCircles(), From bb6f2b9cfdf85c96e4ac3d3f8c57781ed4d7e58d Mon Sep 17 00:00:00 2001 From: Reynir Date: Tue, 27 Jul 2021 14:49:49 +0000 Subject: [PATCH 5/6] Update keyboard.dart --- lib/keyboard.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/keyboard.dart b/lib/keyboard.dart index e8249f1..27d206b 100644 --- a/lib/keyboard.dart +++ b/lib/keyboard.dart @@ -65,7 +65,7 @@ class Keyboard extends StatelessWidget { return Container( width: keyboardSize.width, height: keyboardSize.height, - margin: EdgeInsets.only(top: 16), + margin: EdgeInsets.only(top: 26), child: AlignedGrid( keyboardSize: keyboardSize, children: List.generate(10, (index) { From 70e9b3fe8a0ec030042c114aceb16ad663c0260c Mon Sep 17 00:00:00 2001 From: Reynir Date: Tue, 27 Jul 2021 15:02:50 +0000 Subject: [PATCH 6/6] Update passcode_screen.dart --- lib/passcode_screen.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/passcode_screen.dart b/lib/passcode_screen.dart index e2a54e7..537853c 100644 --- a/lib/passcode_screen.dart +++ b/lib/passcode_screen.dart @@ -29,7 +29,6 @@ class PasscodeScreen extends StatefulWidget { final Color? backgroundColor; final AppBar? appBar; - final double? circleHeight; final Widget? bottomWidget; final List? digits; @@ -47,7 +46,6 @@ class PasscodeScreen extends StatefulWidget { this.bottomWidget, this.backgroundColor, this.appBar, - this.circleHeight, this.cancelCallback, this.digits, }) : circleUIConfig = circleUIConfig ?? const CircleUIConfig(), @@ -117,7 +115,7 @@ class _PasscodeScreenState extends State widget.title, Container( margin: const EdgeInsets.only(top: 20), - height: widget.circleHeight ?? 40, + height: 40, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: _buildCircles(), @@ -159,7 +157,7 @@ class _PasscodeScreenState extends State widget.title, Container( margin: const EdgeInsets.only(top: 20), - height: widget.circleHeight ?? 40, + height: 40, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: _buildCircles(),