How to setState parent from an AlertDialog that is triggered from a DataTable source?

70 Views Asked by At

I've been browsing for a while, but all the answers only answering 1 part of the question. I need to refresh parent state from an AlertDialog that is located inside DataTable source (outside of the state class). This is what I tried Flutter app state not mounted (setState) on click inside DataTable

I can't do setState from DataTable source. I tried to use key, that one almost worked, except that I got the message "invalid use of private type in a public API" and "not mounted". My main app and this screen are 2 different files.

What I want: to refresh my PaginatedDataTable through an AlertDialog that appeared on button click. The button is inside the datatable, in the datatable source class that is outside of the state screen.

The problem: I can't use setState, how to make it possible?

0

There are 0 best solutions below