'How to retain the scroll position of a stateful widget on a screen?

I'm using a stateful widget as a child inside a column widget. And whenever I try to add an event using bloc the screen resets to its initial scroll position. I have tried solutions like using AutomaticKeepAliveMixin to retain the scroll state but had no success with it. Is there any way to prevent this scroll position reset ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source