From 99cba0abccc54c77b99cca8a6813942bff8fa9cd Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 14 Jul 2021 09:04:59 -0700 Subject: [PATCH] make it work on engine.set(new FlutterEngine(applicationContext))); - CompletableFuture statusReceived = new CompletableFuture<>(); + SettableFuture statusReceived = new SettableFuture<>(); // Resolve locale to `en_US`. // This is required, so `window.locale` in populated in dart. @@ -49,8 +49,7 @@ public void smokeTestEngineLaunch() throws Throwable { .get() .getDartExecutor() .setMessageHandler( - "waiting_for_status", - (byteBuffer, binaryReply) -> statusReceived.complete(Boolean.TRUE)); + "waiting_for_status", (byteBuffer, binaryReply) -> statusReceived.set(Boolean.TRUE)); // Launching the entrypoint will run the Dart code that sends the "waiting_for_status" platform // message.