unqlite_flutter
unqlite_flutter copied to clipboard
Desktop support?
Waiting for macOs and Windows support.
@feimenggo
This library can support desktop:
String _libPath = '';
set libPath(String path) => _libPath = path;
ffi.DynamicLibrary _load() {
var path = _libPath.isNotEmpty ? _libPath : "libunqlite.so";
if (Platform.isWindows) {
path = _libPath.isNotEmpty ? _libPath : "libunqlite.dll";
} else if (Platform.isMacOS) {
path = _libPath.isNotEmpty ? _libPath : "libunqlite.dylib";
} else if (Platform.isIOS) {
return ffi.DynamicLibrary.process();
}
return ffi.DynamicLibrary.open(path);
}
Just call libPath
to set the path of the dynamic library.For the compilation of the dynamic library, you can check the documentation of this unqlite, and configure the cmake environment and compiler.