HiveDataSourceConfig class final

Configuration for the Hive engine, which stores each collection in its own Hive box.

Works on every Flutter platform. On the web, boxes live in IndexedDB and directory is ignored.

Inheritance

Constructors

HiveDataSourceConfig({required String directory, List<String> preloadBoxes = const [], List<String> collections = const [], HiveEncryptionConfig? encryption})
Creates a Hive configuration that keeps its boxes in directory.
const

Properties

collections → List<String>
Collections that drop() always covers, on top of the ones the data source has recorded itself. For collections written by 1.1.x or earlier, which were never recorded. Unlike preloadBoxes, these aren't opened at init().
final
directory → String
Where the engine keeps its files. Engines that don't use one ignore it, as Hive does on the web.
finalinherited
encryption → HiveEncryptionConfig?
Encrypts every box, or null to store them in plain form.
final
hashCode → int
The hash code for this object.
no setterinherited
preloadBoxes → List<String>
Collections opened during init(), so their first read is fast.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createDataSource() → UnifiedDataSource
Creates the data source this configuration describes, without opening it. UnifiedDataSourceFactory.create calls UnifiedDataSource.init on the result.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited