Result: Scanner freezes.
When closing the scanner, we see the following log. I am actually not sure if this is an issue with the scanner library or the app.
======== Exception caught by widgets library =======================================================
The following assertion was thrown while finalizing the widget tree:
AnimationController.dispose() called more than once.
A given AnimationController cannot be disposed more than once.
The following AnimationController object was disposed multiple times: AnimationController#43a5a(◀ 0.600; paused; DISPOSED)
When the exception was thrown, this was the stack:
#0 AnimationController.dispose.<anonymous closure> (package:flutter/src/animation/animation_controller.dart:798:9)
#1 AnimationController.dispose (package:flutter/src/animation/animation_controller.dart:809:6)
#2 QrReaderViewMixin.clearAnimation (package:flutter_qr_scan/views/qr_reader_view_mixin.dart:39:25)
#3 QrReaderViewMixin.dispose (package:flutter_qr_scan/views/qr_reader_view_mixin.dart:90:5)
#4 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:5105:11)
#5 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1917:13)
#6 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1915:7)
#7 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6398:16)
#8 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1913:13)
#9 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1915:7)
#10 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4931:14)
#11 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1913:13)
#12 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1915:7)
...