overrideFor method

  1. @override
void overrideFor(
  1. OperatingSystem os,
  2. String path
)
override

Makes duckdb.dart use the open function when running on the specified os. This can be used to override the loading behavior on some platforms. To override that behavior on all platforms, consider using overrideForAll. This method must be called before opening any database.

When using the asynchronous API over isolates, open must be a top- level function or a static method.

Implementation

@override
void overrideFor(OperatingSystem os, String path) {
  _overriddenPlatforms[os] = () => DynamicLibrary.open(path);
}