From e2749ffc0da80ae6af60968f85b6b2dc4ed954af Mon Sep 17 00:00:00 2001 From: Atli Date: Thu, 23 Mar 2023 16:22:53 +0000 Subject: [PATCH] Update flushbar_route.dart --- lib/flushbar_route.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/flushbar_route.dart b/lib/flushbar_route.dart index aaaa6bb..f475a68 100644 --- a/lib/flushbar_route.dart +++ b/lib/flushbar_route.dart @@ -434,7 +434,9 @@ class FlushbarRoute extends OverlayRoute { assert(!_transitionCompleter.isCompleted, 'Cannot dispose a $runtimeType twice.'); _controller?.dispose(); - _transitionCompleter.complete(_result); + if (_result != null) { + _transitionCompleter.complete(_result); + } super.dispose(); }