How do you call a method in stateful widget Flutter?

Calling a method of child widget from a parent widget is discouraged in Flutter. Instead, Flutter encourages you to pass down the state of a child as constructor parameters. Instead of calling a method of the child, you just call setState in the parent widget to update its children .25 Haz 2018

Sizin İçin Seçtik  What is the difference between Statelesswidget and StatefulWidget?

Leave a Reply

Your email address will not be published. Required fields are marked *