databaseFactoryOrNull top-level property

  1. @visibleForTesting
DatabaseFactory? get databaseFactoryOrNull

Default database factory.

Implementation

@visibleForTesting
DatabaseFactory? get databaseFactoryOrNull => _databaseFactory;
set databaseFactoryOrNull (DatabaseFactory? databaseFactory)

Change the default factory.

Implementation

set databaseFactoryOrNull(DatabaseFactory? databaseFactory) {
  if (databaseFactory != null) {
    if (databaseFactory is! SqfliteDatabaseFactory) {
      throw ArgumentError.value(
          databaseFactory, 'databaseFactory', 'Unsupported sqflite factory');
    }
    _databaseFactory = databaseFactory;
  } else {
    /// Unset
    _databaseFactory = null;
  }
}