Regular flutter widgets don't typically dispose of controllers they are explicitly provided.
I was wondering why I was getting errors when disposing TextEditingControllers and the MoonCarouselScrollController.
Turns out, that MoonCarousel will dispose MoonCarouselScrollController even if it was passed explicity.
A MoonCarouselScrollController was used after being disposed.
The same is true for MoonAuthCode, where Im getting this error when disposing:
Once you have called dispose() on a TextEditingController, it can no longer be used.
Regular flutter widgets don't typically dispose of controllers they are explicitly provided. I was wondering why I was getting errors when disposing TextEditingControllers and the MoonCarouselScrollController.
Turns out, that
MoonCarousel
will disposeMoonCarouselScrollController
even if it was passed explicity.The same is true for
MoonAuthCode
, where Im getting this error when disposing:I would suggest adding the following: