diff --git a/lib/controllers/client.dart b/lib/controllers/client.dart index 27c0646..af44d2f 100644 --- a/lib/controllers/client.dart +++ b/lib/controllers/client.dart @@ -49,17 +49,15 @@ import "package:path_provider/path_provider.dart"; class ClientController extends AsyncNotifier { @override Future build() async { - final handle = await Isolate.run(() async { - final Pointer root; - if (Platform.isAndroid || Platform.isIOS) { - final dir = await getApplicationSupportDirectory(); - root = "${dir.path}/gomuks".toNativeUtf8().cast(); - } else { - root = nullptr.cast(); - } + final Pointer root; + if (Platform.isAndroid || Platform.isIOS) { + final dir = await getApplicationSupportDirectory(); + root = "${dir.path}/gomuks".toNativeUtf8().cast(); + } else { + root = nullptr.cast(); + } - return GomuksInit(root); - }); + final handle = GomuksInit(root); final callable = NativeCallable< diff --git a/scripts/generate.dart b/scripts/generate.dart index b9b8511..2966c9f 100644 --- a/scripts/generate.dart +++ b/scripts/generate.dart @@ -11,12 +11,12 @@ void main(List args) async { final libclangPath = Platform.environment["LIBCLANG_PATH"]; FfiGenerator( - output: .new( + output: Output( dart: .new( 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( entryPoints: [File(join(repoDir.path, "pkg", "ffi", "gomuksffi.h")).uri], compilerOptions: [