From 9cceca71615d139db7de74522fe10a83a17f43f6 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 14 Jul 2021 09:37:40 -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 class EngineLaunchE2ETest { .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.