- Model previousViewModel,
- Model newViewModel
A function that will be run on state change, before the build method.
This function is passed the
Model, and if
it will only be called if the
This is useful for making calls to other classes, such as a
TabController, in response to state changes.
It can also be used to trigger an action based on the previous state.
typedef OnWillChangeCallback<Model> = void Function( Model previousViewModel, Model newViewModel, );