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()
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 regularcontroller.offset
orcontroller.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 afinal _scrollController = ScrollController()