I have created a non-static list. With buttons, you can add and delete elements to this list. Now I want to display this list on two screens. On one screen I want to use a ListView, on the other screen a StackCard.builder. My target is that there is only one list at a time - if it is changed in one Screen, it should change identically automatically in the other Screen.
Now to my question: How can I use the list I created in one class in the other class?
I would be very happy about an answer, thanks in advance for all who look at my problem!
Here is the Code for the Screen with the List
Here is the second screen, where I try to show the List with the StackCard.builder