I’m developing a Flutter application where I have a widget (BatteryList) inside a drawer that fetches and displays data using Blocs. I’m using AutomaticKeepAliveClientMixin to preserve the state of this widget when the drawer is opened and closed. However, I’m encountering issues where the state seems to reset when I close and reopen the drawer. Here’s a simplified version of my code:
I’m using AutomaticKeepAliveClientMixin to preserve the state of this widget when the drawer is opened and closed. However, I’m encountering issues where the state seems to reset when I close and reopen the drawer.