momentum library
MVC pattern for flutter. Works as state management, dependency injection and service locator.
Classes
-
InjectService<
S extends MomentumService> - Use this class to inject multiple services of the same type with different configurations using alias.
- Momentum
- The root widget for configuring Momentum.
- MomentumBuilder
- The widget class for displaying your model properties.
-
MomentumController<
M> - The class which holds the logic for your app. This is tied with MomentumModel.
-
MomentumModel<
Controller extends MomentumController> - The class which holds the state of your app. This is tied with MomentumController.
- MomentumRouter
- A built-in momentum service for persistent navigation system.
- MomentumService
-
Use for marking any classes as services
to inject them into the
services
parameter of Momentum root widget and use them down the tree. -
MomentumState<
T extends StatefulWidget> - A State class with additional properties. Also allows you to add listeners for controllers.
- MomentumTester
- Testing tool for momentum.
- RouterPage
- Wrap your screen widget with this to properly implement popping with system back button.
- RouterParam
- An abstract class required for marking a certain data class as a router param model.
Enums
- BootstrapStrategy
-
Set the bootstrap behavior for controllers if lazy mode is
true
.
Mixins
- RouterMixin
- A mixin for MomentumController that adds the capability to handle route changes from momentum's built-in routing system.