setDylibDir static method

void setDylibDir({
  1. required String dylibDir,
})

Sets the directory where dynamic libraries are looked for. On dart standalone, call this in new isolate before doing any JNI operation.

(The reason is that dylibs need to be loaded in every isolate. On flutter it's done by library. On dart standalone we don't know the library path.)

Implementation

static void setDylibDir({required String dylibDir}) {
  if (!Platform.isAndroid) {
    _dylibDir = dylibDir;
  }
}