This project is a technology demonstrator for using a packages as independent modules. The project aims to provide an effective mechanism for data communication between different modules, where each module exposes APIs for data data communication.
Independent modules allow for greater testability, and scalability with a plug-n-play model where the modules can be added and removed easily.
The architecture chosen to achieve this goal is the Hexagon Architecture, also known as the Ports and Adapter architecture. For a simple flutter project based on this architecture you can see this excellent medium article.
The design pattern chosen here is MVI a.k.a Model-View-Intent.
Reference: https://www.novatec-gmbh.de/en/blog/mvi-in-android/
In this design pattern, an intent is thrown by the user to the model, which emits a new state based on the received inent. The view listens to the states emitted by the model, and updates the UI accordinly.
The primary principle of this pattern is that the state never mutates: always a new state is emitted by the model. This ensures that even there are mulitple listeners for a state, they will always get the same state.
Most of the heavy duty state management is being handled in the model using stream and streambuilder. On the presentation layer however, we will be using Bloc due to its immense popularity and greater community support. However, any state management tool can be used instead, it is upto the developer to use the tool that they are comfortable with.
Please note: that this project is still in development, and will be updated frequently.