Create a Flutter app with two tabs that communicate via state.
Details
The app should build off of the app from the last activity by adding the following:
the class
CountModelthat extendsChangeNotifier, defined in a separate file, that represents the number of times the button has been pressed. The class should define a mutator methodincrementthat modifies the model’s state and notifies listeners.a
ChangeNotifierProviderto the parent widget.a
Consumerwidget to the tab that displays the count.a call to the
Provider.offunction in the button tap handler to update the model without rebuilding the button.