getIdbFactory function

IdbFactory? getIdbFactory([
  1. String? name
])

Get a factory by name.

Not recommended.

Implementation

IdbFactory? getIdbFactory([String? name]) {
  name ??= idbFactoryNameBrowser;

  switch (name) {
    case idbFactoryNameBrowser:
      return idbFactoryNative;
    case idbFactoryNamePersistent:
      return idbFactoryNative;
    case idbFactoryNameNative:
      return idbFactoryNative;
    case idbFactoryNameMemory:
    case idbFactoryNameSembastMemory:
      return idbFactoryMemory;
    default:
      throw UnsupportedError("Factory '$name' not supported");
  }
}