Compare commits

..
2 changed files with 11 additions and 13 deletions

View file

@ -49,17 +49,15 @@ import "package:path_provider/path_provider.dart";
class ClientController extends AsyncNotifier<int> { class ClientController extends AsyncNotifier<int> {
@override @override
Future<int> build() async { Future<int> build() async {
final handle = await Isolate.run(() async { final Pointer<Char> root;
final Pointer<Char> root; if (Platform.isAndroid || Platform.isIOS) {
if (Platform.isAndroid || Platform.isIOS) { final dir = await getApplicationSupportDirectory();
final dir = await getApplicationSupportDirectory(); root = "${dir.path}/gomuks".toNativeUtf8().cast();
root = "${dir.path}/gomuks".toNativeUtf8().cast(); } else {
} else { root = nullptr.cast();
root = nullptr.cast(); }
}
return GomuksInit(root); final handle = GomuksInit(root);
});
final callable = final callable =
NativeCallable< NativeCallable<

View file

@ -11,12 +11,12 @@ void main(List<String> args) async {
final libclangPath = Platform.environment["LIBCLANG_PATH"]; final libclangPath = Platform.environment["LIBCLANG_PATH"];
FfiGenerator( FfiGenerator(
output: .new( output: Output(
dart: .new( dart: .new(
path: Platform.script.resolve("../lib/src/third_party/gomuks.g.dart"), path: Platform.script.resolve("../lib/src/third_party/gomuks.g.dart"),
), ),
), ),
visitors: [.new(func: (node) => node.isIncluded = true)], visitors: [Visitor(func: (node) => node.isIncluded = true)],
input: .new( input: .new(
entryPoints: [File(join(repoDir.path, "pkg", "ffi", "gomuksffi.h")).uri], entryPoints: [File(join(repoDir.path, "pkg", "ffi", "gomuksffi.h")).uri],
compilerOptions: [ compilerOptions: [