We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 842d858 + 4b56e1e commit ce80787Copy full SHA for ce80787
1 file changed
packages/widget_toolkit_pin/lib/src/lib_pin_code_with_biometrics/ui_components/pin_code_key.dart
@@ -48,9 +48,12 @@ class _PinCodeKeyState extends State<PinCodeKey> {
48
onTapDown: widget.isLoading
49
? null
50
: (_) async {
51
- setState(() {
52
- isPressed = true;
53
- });
+ if (mounted) {
+ setState(() {
+ isPressed = true;
54
+ });
55
+ }
56
+
57
if (widget.isFingerScan || widget.isFaceScan) {
58
await Future.delayed(widget.tintDuration);
59
}
@@ -109,9 +112,11 @@ class _PinCodeKeyState extends State<PinCodeKey> {
109
112
calculateKeyboardButtonSize(context);
110
113
111
114
void _cancelPress() {
- isPressed = false;
115
116
117
+ isPressed = false;
118
119
120
121
122
void _delayedButtonRelease() async {
0 commit comments