loadLibrary static method

DynamicLibrary loadLibrary({
  1. String? dir,
  2. String? file,
})

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));
}