resolveDynamicLibrary function
Resolves dynamic library for FFI depending on current platform.
Implementation
DynamicLibrary resolveDynamicLibrary() {
if (Platform.isLinux) {
return DynamicLibrary.open('h3.so');
}
if (Platform.isAndroid) {
return DynamicLibrary.open('libh3.so');
}
if (Platform.isWindows) {
return DynamicLibrary.open('h3.dll');
}
return DynamicLibrary.process();
}