Database Repository for Dart/Flutter

codecov Pub Version GitHub branch checks state

Use this Repository pattern to abstract the Database Logic away and use an abstract interface.

How to install

dart pub add database_repository

How to use

void main() {
    final myDatabaseAdapter = /* A DatabaseAdapter */
    final mySerializer = /* Some Serializer for your entities */
    // Register a Database Adapter that you want to use.

    final repository = DatabaseRepository.fromRegistry(serializer: mySerializer);
    // Now use some methods such as create() etc.