currently, I am not able to restore data when I am changing routes.
how can we restore data using autoroute?
I am unable to find any resources related to it.
currently, I am not able to restore data when I am changing routes.
how can we restore data using autoroute?
I am unable to find any resources related to it.
You can use keys https://www.youtube.com/watch?v=kn0EOS-ZiIc
class ProductPage extends StatefulWidget {
ProductPage({Key key, this.product}) : super(key: key);
...
call it with a fixed key to reuse the widget key: Key('ProductPage_${product.id}') or key: UniqueKey() if you want it to be created again every time.