How to not lose a data from the list when going from one screen to another screen in flutter?
问题 I have a class ViewTotalItemProvider which extends the ChangeNotifier. Inside the class, there is a list like this. class ViewTotalItemProvider extends ChangeNotifier{ List<CartPlantLists> cartPlantList3 = []; } Additionally, there are 3 screens including class like, PlantFeatureScreen1 , ParticularPlant2 , CartDetais3 . All are stateful widget and I am adding some items in second screen i.e. ParticularPlant2 class. When I try to show the items from list in the second screen and the third