brick_core 1.2.1 copy "brick_core: ^1.2.1" to clipboard
brick_core: ^1.2.1 copied to clipboard

Interfaces and shared helpers for implementing models, adapters, providers, and repositories in Brick, an intuitive way to work with persistent data in Dart.

brick_core workflow

Brick Core #

Interfaces and shared helpers for implementing models, adapters, providers, and repositories in Brick.

Principles #

Brick's architecture encourages using data through a single access point: the repository.

Data flow with a single provider

A repository may implement multiple providers, but after instantiation the end application is only aware of the repository. The stream of data follows one course through each provider:

Data flow with many providers

The repository is aware of provider(s), the provider(s) are aware of the adapters, the adapters are aware of models, and the models are aware of only themselves. From the reverse, models are unaware, adapters are unaware of providers and providers are unaware of repositories.

Awareness

Because models are atomic and unaware, they don't rely on (de)serializing functions (unlike with JSON serializable). Brick reduces the concerns of the end-implementation by hiding (de)serializing and fetching logic into adapters, which translate raw data between providers:

Adapters

8
likes
150
points
2.96k
downloads

Publisher

unverified uploader

Weekly Downloads

Interfaces and shared helpers for implementing models, adapters, providers, and repositories in Brick, an intuitive way to work with persistent data in Dart.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection

More

Packages that depend on brick_core