Set State of parent Widget

Viewed 13612

Let's say, I have a custom button widget and I want to set the state of it's parent using setState. How exactly can I access the parent widget's state from my custom button? Is it even possibile?

1 Answers

You can use callbacks functions to achieve this. You can refer here.

In the link

  • FeedPage is similar to CustomButton(ChildWiget)
  • RootPage is similar to ParentWiget
Related