The bottom sheet disappears, but then appears again in 20 seconds. That's weird. After some debugging, I found that the animation that's supposed to collapse the bottom sheet, never ends, and _value gets set to 1.0 suddenly after 20 seconds. Further debugging revealed that the root cause was the direction that was set incorrectly to 1.0 whereas it should be -1.0 in case of collapsing the popup. In fact, by looking at animation_controller.dart:361 it's obvious that direction will always be equal to 1.0. After my fix, everything started working well and the animation stops when it should.
While reviewing my changes, I noticed that the code might also not be handling correctly the case where targetBound == currentBound. Indeed, that results in a never-ending animation as well. I fixed that in launch().
I noticed a bug: when I call:
The bottom sheet disappears, but then appears again in 20 seconds. That's weird. After some debugging, I found that the animation that's supposed to collapse the bottom sheet, never ends, and
_value
gets set to 1.0 suddenly after 20 seconds. Further debugging revealed that the root cause was the direction that was set incorrectly to 1.0 whereas it should be -1.0 in case of collapsing the popup. In fact, by looking at animation_controller.dart:361 it's obvious that direction will always be equal to 1.0. After my fix, everything started working well and the animation stops when it should.While reviewing my changes, I noticed that the code might also not be handling correctly the case where
targetBound == currentBound
. Indeed, that results in a never-ending animation as well. I fixed that inlaunch()
.