clean_application library

Classes

AnimatedView<C extends Controller>
This view allows the Animation to a View
CleanApplication
This class is the root of the application It register all the datasources, repositories, use cases and controllers. The above order is the order in which the registration is done because of the Clean architecture call flow. The public static methods is used to access the registered instance on each layer.
Configuration
This class provides the dependencies to be injected in the application
Controller
Controller class that hold a View business logic
ControllerNotifierData
CrudDataSource<ModelType extends Model<Entity, dynamic>, IdType>
CrudRepository<EntityType extends Entity, IdType>
DataSource<ModelType extends Model<Entity, dynamic>, IdType>
DynamicComponent<C extends Controller>
This component will rebuild when the view state change is triggered by the controller
Entity<IdType>
This class represent an entity. Every entity have an unique id Every entity extends equals and by default the id is used to compare the entity equality. This can be overrided.
Environments
Environments to be registered for interfaces implementations
Equals
This class is copied from Equatable but without the immutable. The immutable property was removed because very often we need to change the object/entity in our application.
Factory<T>
Provides an instance of a Controller
FutureUseCase<T, Param extends UseCaseParam>
Implementation<T>
Provides multiple implementations to a Contract/Interface (abstract class). All interfaces are instanciated at the registration time (application init). This is intended mainly for DataSource and Repository implementations. TODO: This can be improved with lazy singleton?
Model<EntityType extends Entity, DataSourceDataType>
ModelMap<EntityType extends Entity>
Repository<EntityType extends Entity, IdType>
Result<T>
All call should return a result object.
Router
A wrapper class around the NavigatorState The main purpose is to not use allways a BuildContext to navigate between Views. It's easy to navigate between views using their class type. example: router.pushType(HomeView, arguments: 'Title')
RouterBuilder<T>
This class provides a widget view according to the routes registered in the Configuration
Service
A service class to be injected custom services as custom services.
StaticComponent<C extends Controller>
This component don't rebuild with the view state changes triggered by the controller.
StaticView<C extends Controller>
This view don't rebuild with the view state changes triggered by the controller.
StreamConverter
StreamDataSource<ModelType extends Model<Entity, dynamic>, IdType>
StreamRepository<EntityType extends Entity, IdType>
StreamUseCase<T, Param extends UseCaseParam>
UseCase<T, Param extends UseCaseParam>
Usecase represent a class with a single concern. T is the type to be returned
UseCaseParam
A class to send parameter to call a use case Must be extended This was created to improve test driven development
View<C extends Controller>

Enums

ControllerState

Typedefs

FactoryBuilder<T>() → T
A function to provide an instance of a controller
InstanceBuilder<T>() → T
A function to provide an instance of an interface implementation