OnWillChangeCallback<Model> typedef

void OnWillChangeCallback (
  1. Model viewModel

A function that will be run on state change, before the build method. This function is passed the Model, and if distinct is true, it will only be called if the Model changes. This can be useful for imperative calls to things like Navigator, TabController, etc


typedef OnWillChangeCallback<Model> = void Function(Model viewModel);