To pass data to stateful widget, first of all, create two pages. Now from the first page open the second page and pass the data. Inside the second page, access the variable using the widget .
Read moreHow do I change stateless widget to stateful?
“convert stateless widget to stateful widget” Code Answer’s
Read more