useLocalLibrary function
dart_periphery loads the library from the actual directory. See native-libraries for details.
Implementation
void useLocalLibrary([CpuArchitecture arch = CpuArchitecture.undefined]) {
if (arch == CpuArchitecture.undefined) {
_peripheryLibPath = './${_autoDetectCPUarch()}';
} else {
if (arch == CpuArchitecture.notSupported) {
throw LibraryException(
LibraryErrorCode.invalidParameter, "Invalid parameter");
}
var cpu = arch.toString();
cpu = cpu.substring(cpu.indexOf(".") + 1).toLowerCase();
_peripheryLibPath = './libperiphery_$cpu.so';
}
}