mvc_pattern library

This library contains the classes necessary to develop apps using the MVC design pattern separating the app's 'interface' from its 'business logic' and from its 'data source' if any.

Code samples can be found in the following links: https://github.com/AndriousSolutions/mvc_pattern/blob/master/example/main.dart https://github.com/AndriousSolutions/mvc_pattern/blob/master/test/widget_test.dart

https://github.com/AndriousSolutions/mvc_pattern/

Classes

AppStatefulWidgetMVC
Main or first class to pass to the 'main.dart' file's runApp() function.
AppStateMVC<T extends AppStatefulWidgetMVC>
The StateMVC object at the 'app level.' Used to effect the whole app and is the State class for the StatefulWidget, AppStatefulWidgetMVC.
ControllerMVC
Your 'working' class most concerned with the app's functionality. Add it to a 'StateMVC' object to associate it with that State object.
InheritedStatefulWidget<U extends InheritedWidget>
Passes along a InheritedWidget to its State object.
InheritedStateMVC<T extends StatefulWidget, U extends InheritedWidget>
A StateMVC object but inserts a InheritedWidget into the Widget tree.
ModelMVC
This class is to be concerned with the data It is accessed by the Controller but can call setState() as well.
SetState
Used like the function, setState(), to 'spontaneously' call build() functions here and there in your app. Much like the Scoped Model's ScopedModelDescendant() class. This class object will only rebuild if the App's InheritedWidget notifies it as it is a dependency. More information: https://medium.com/flutter-community/shrine-in-mvc-7984e08d8e6b#488c
StateMVC<T extends StatefulWidget>
The State Object seen as the 'View of the State.' Uses the mixins: WidgetsBindingObserver, _ControllerList, _StateListeners
StateSetter
Allows you to call 'setState' from the 'current' the State object.
Uuid
A UUID generator, useful for generating unique IDs. Shamelessly extracted from the author of Scoped Model plugin, Who maybe took from the Flutter source code. I'm not telling!

Mixins

FutureBuilderStateMixin<T extends StatefulWidget>
Supply a FutureBuilder to a State object.
InheritedStateMixin<T extends StatefulWidget>
StateListener
Responsible for the event handling in all the Controllers, Listeners and Views.