todos_repository_core/README.md
An app-agnostic data source that can be used by sample apps to fetch and persist data.
The goal of the repository pattern is to provide an abstract interface to the data layer of your application. The Repository describes the entities that can be fetched and stored, but should not expose how those things happen.
The term "Data Layer" comes from the "Clean Architecture Pattern." In this pattern, we separate our app into layers. Each Layer should only talk to the layer after it.
flutter_test.This library does not expose the in-memory, web client, or file storage mechanisms directly, but describes what an interface the domain layer can work with.
Concrete implementations, such as todos_repository_simple, provide the actual mechanism for storing and retrieving data for the appropriate environment.
This separation provides several benefits:
In order to maximize code sharing, the domain layer should be pure Dart and depend on the abstract classes defined in this library rather than concrete implementations. This allows the domain layer to be shared across different environments, such as Flutter and Web.