This project serves as a demo to showcase some key features to make flutter development an incredible experience
- Arquitecture
- Testing
- Native
- Configuration
- Libraries
We follow a clean arquitecture approach that enforces seperation of concerns. This allows our code to be more readable, testable and less error-prone. Our own custom approach to the arquitecture is to have three main layers.
This layer holds all the logic related to the UI. It has little to no business logic and primarily serves to display views and widgets to the user and receive user interaction. By keeping this layer free from all business logic, we can safely work on UI design and not have to worry about breaking functionality. Additionaly, this also has the benefit of making the views and widgets relatively lean, thus further enhancing readability.
This layer also holds our state controllers. These controllers focus on reducing state and making calls to either a usecase or a repository.
This layer is where the main business logic of the application resides, it is the "meat" of the app. The layer is primary split into models, repositories and use cases.
- Models: Holds the bussiness entities of the application
- Repositories: Holds the abstract class that specify what a repository implementation must fullfill. By keeping the abstraction in this layer, we can improve testability.
- Usecases: Usecases are where application specific business logic is performed. These usecases are single responsibility classes that allow our business logic to be seperated from the flutter framework.
This layer holds the repository implementations and primarily focuses on making database and API requests. By seperating this layer from the business logic, we can achieve tremendous independency from specific database and API providers, making transitions to different providers relatively easy.
Flutter Unit Test Documentation
In flutter, Integration testing erroneusly refers to E2E Testing. It is important to understand the difference to avoid confusion
Flutter Integration Testing Documentation
Flutter Integration Testing with Firebase Test LabStatic methods in flutter cannot be mocked, if you need to mock a static method then create a wrapper class around the library.
Implementing the call method in a class allows us to call a class like a function
- Internationalization and Date Package
- Dependency Injection
- Image Caching
- URl Launcher
- Environment Config
- Http Client
- Equality Comparison
- Launch Screen and App Icons
- Linting
- Hooks
- Mocking
- Stacked Services
- Route Generation