Closed Skquark closed 2 years ago
I had to roll back to ^1.0.5 for the error to go away whenever I'd call skowFlexibleBottomSheet, even v2.0.0 was broken. Maybe it has to do with the latest Flutter update, I'm on the master channel which might have changed something with the DraggableScrollableController code. I don't know, but I'd be surprised if I'm the only person getting this bug.
Same error
Same 🐛
Same error with new flutter 3.3.0 :
DraggableScrollableController is not attached to a sheet. A DraggableScrollableController must be used in a DraggableScrollableSheet before any of its methods are called.
'package:flutter/src/widgets/draggable_scrollable_sheet.dart':
Failed assertion: line 170 pos 7: 'isAttached'
I fix the problem when insert check on isAttached.
Alright, that fix makes sense, good deal. Now it just needs to be patched in a new version release, then we'll be able to update to the corrected build. Will keep an eye out for the upgrade, would rather not create a fork to apply that change when it should be changed for everyone. Thanks!
@Darkildo @Skquark can you create a PR with this fix ?
Forget it, here is the PR https://github.com/surfstudio/flutter-bottom-sheet/pull/64
The reason of issue: content of FlexibleBottomSheet uses size of it's controller when controller was not attached How was fixed: set default size for content of FlexibleBottomSheet with value of initHeight
- currentExtent: _controller.size,
+ currentExtent: _controller.isAttached
+ ? _controller.size
+ : widget.initHeight,
Fixed on: https://github.com/surfstudio/flutter-bottom-sheet/pull/65
Same bug. Is it fixed?
I'm getting this error all of a sudden after upgrading to the latest version:
I tried a bunch of debug steps, looked into the code, doublechecked usage of showFlexibleBottomSheet, checked all issues, and can't figure it out. It was working fine before, I'd show my code, but it's basically the same as what you show in the examples. Any suggestions?