diff --git a/lib/ui/account/two_factor_setup_page.dart b/lib/ui/account/two_factor_setup_page.dart index 14c43247d..7847640b6 100644 --- a/lib/ui/account/two_factor_setup_page.dart +++ b/lib/ui/account/two_factor_setup_page.dart @@ -68,6 +68,7 @@ class _TwoFactorSetupPageState extends State @override void dispose() { WidgetsBinding.instance.removeObserver(_lifecycleEventHandler); + widget.completer.isCompleted ? null : widget.completer.complete(); super.dispose(); } @@ -266,7 +267,6 @@ class _TwoFactorSetupPageState extends State .enableTwoFactor(context, widget.secretCode, code); if (success) { _showSuccessPage(); - widget.completer.complete(); } }