MatrixSdkDatabase constructor

MatrixSdkDatabase(
  1. String name, {
  2. Database? database,
  3. dynamic idbFactory,
  4. DatabaseFactory? sqfliteFactory,
  5. int maxFileSize = 0,
  6. @Deprecated('Breaks support for web standalone. Use [fileStorageLocation] instead.') dynamic fileStoragePath,
  7. Uri? fileStorageLocation,
  8. Duration? deleteFilesAfterDuration,
})

Implementation

MatrixSdkDatabase(
  this.name, {
  this.database,
  this.idbFactory,
  this.sqfliteFactory,
  this.maxFileSize = 0,
  // TODO : remove deprecated member migration on next major release
  @Deprecated(
      'Breaks support for web standalone. Use [fileStorageLocation] instead.')
  dynamic fileStoragePath,
  Uri? fileStorageLocation,
  Duration? deleteFilesAfterDuration,
}) {
  final legacyPath = fileStoragePath?.path;
  this.fileStorageLocation = fileStorageLocation ??
      (legacyPath is String ? Uri.tryParse(legacyPath) : null);
  this.deleteFilesAfterDuration = deleteFilesAfterDuration;
}