Database constructor

Database({
  1. required String name,
  2. String? path,
  3. bool? encrypted,
  4. String? secretKey,
  5. bool? isWeb = false,
})

Implementation

Database({
  required this.name,
  String? path,
  bool? encrypted,
  String? secretKey,
  bool? isWeb = false,
}) : _storage = DatabaseStorage(name: name, path: path ?? name),
     _encrypted = encrypted ?? false,
     _isWeb = isWeb ?? false {
  _collections.addAll(_storage.getCollections(this));
  _stores.addAll(_storage.getStores(this));
}