overrideFor method Null safety

void overrideFor(
  1. OperatingSystem os,
  2. OpenLibrary open
)

Makes moor_ffi 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

void overrideFor(OperatingSystem os, OpenLibrary open) {
  _overriddenPlatforms[os] = open;
}