A stateful widget is a widget with mutable state and rebuild itself upon changing the state. There are several state management approaches to manage state as specified on flutter.dev . It is quite easy to update its state from inside using the setState method but if we would like to update it from outside then we have to use one of the available packages. Today i am going to show you that we can also use controllers to manage state of a stateful widget from outside just like TextEditingController is used in case of TextField or a TextFormField . This approach is also suitable if we are creating a package and don't want to use other state management packages as dependencies. Let's modify the default increment app that the flutter plugin generates. First create a controller class as follows: class MyController { VoidCallback onIncrement ; void dispose () { onIncrement = null; } } MyController is a simple class with onIncrement property ...