1

is there a way to prevent setState to rebuild? because I have to show my state inside widget Text but whenever I click another tab and back again to my main screen... the state always re-build and I am getting null

uyhaW
  • 1,141
  • 19
  • 45

1 Answers1

0

you can use AutomaticKeepAliveClientMixin to save the state of app.

@override // TODO: implement wantKeepAlive bool get wantKeepAlive => true;

using this constuctor.