modal_bottom_sheet icon indicating copy to clipboard operation
modal_bottom_sheet copied to clipboard

ModalScrollController cannot be used to get scroll position (eg after adding a listener to it)

Open mrares opened this issue 9 months ago • 0 comments

As soon as I use the ModalScrollController in a SingleChildScrollView inside of a modal bottom sheet, the controller gets two positions attached and addListener cannot be used with the regular controller.offset or controller.position.maxScrollExtent without triggering an error.

As a stop-gap I'm using controller.positions.first but I wonder if this is some kind of mistake on my part or if this is expected.

Prior to using the ModalScrollController I was simply declaring a final _scrollController = ScrollController()

mrares avatar May 15 '24 15:05 mrares