loadLibrary static method
Implementation
static DynamicLibrary loadLibrary({String? dir, String? file}) {
if (file == null) {
if (Platform.isMacOS || Platform.isIOS) {
file = 'libtdjson.dylib';
} else if (Platform.isWindows) {
file = 'tdjson.dll';
} else {
file = 'libtdjson.so';
}
}
if (dir == null) {
return DynamicLibrary.open(file);
}
return DynamicLibrary.open(path.join(dir, file));
}