loadLib static method
Function used to internally load dynamic libraries. For developer use only.
Implementation
static DynamicLibrary loadLib() {
final libraryPathURI = File(Platform.resolvedExecutable).parent.uri;
if (Platform.isLinux) {
return DynamicLibrary.open(
libraryPathURI.resolve('lib/libLexActivator.so').path);
} else if (Platform.isWindows) {
return DynamicLibrary.open(Platform.script
.resolve("build/windows/Runner/Debug/LexActivator.dll")
.toFilePath(windows: true));
} else if (Platform.isMacOS) {
return DynamicLibrary.open('libLexActivator.dylib');
} else if (Platform.isAndroid) {
return DynamicLibrary.open('libLexActivator.dylib');
} else if (Platform.isAndroid) {
return DynamicLibrary.open('libLexActivator.dylib');
} else {
throw Exception();
}
}