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
- Main or first class to pass to the 'main.dart' file's runApp() function.
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.
- Your 'working' class most concerned with the app's functionality. Add it to a 'StateMVC' object to associate it with that State object.
U extends InheritedWidget>
- Passes along a InheritedWidget to its State object.
T extends StatefulWidget, U extends InheritedWidget>
- A StateMVC object but inserts a InheritedWidget into the Widget tree.
- This class is to be concerned with the data It is accessed by the Controller but can call setState() as well.
- 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
T extends StatefulWidget>
- The State Object seen as the 'View of the State.' Uses the mixins: WidgetsBindingObserver, _ControllerList, _StateListeners
- Allows you to call 'setState' from the 'current' the State object.
- 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!