hive_flutter_repository 1.0.3 copy "hive_flutter_repository: ^1.0.3" to clipboard
hive_flutter_repository: ^1.0.3 copied to clipboard

A DatabaseAdapter for the hive database as used by the database_repository package optimized for use with flutter

Hive Database Repository for Flutter #

Pub Version GitHub branch checks state

Use this database adapter for hive to integrate with database_repository when running using flutter

Not using Flutter? #

Better use hive_repository as it does not rely on the flutter SDK

How to install #

dart pub add hive_flutter_repository

How to use #

void main() {
    final pathWhereHiveShouldLive = /* Some path that is writable */
    final myDatabaseAdapter = HiveFlutterDatabaseAdapter(path: pathWhereHiveShouldLive);
    
    
    // Register a Database Adapter that you want to use.
    DatabaseAdapterRegistry.register(myDatabaseAdapter);

    final repository = DatabaseRepository.fromRegistry(serializer: mySerializer, name: 'hive');
    
    // Now use some methods such as create() etc.
}
0
likes
140
pub points
6%
popularity

Publisher

verified publisherglassp.dev

A DatabaseAdapter for the hive database as used by the database_repository package optimized for use with flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, hive_flutter, hive_repository

More

Packages that depend on hive_flutter_repository