From a3d7e651f4450d811af00e49aa8a9fc60b6078c4 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Fri, 1 Dec 2023 17:50:32 +1300 Subject: [PATCH] Add generated code --- windows/runner/flutter_window.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp index b25e363..955ee30 100644 --- a/windows/runner/flutter_window.cpp +++ b/windows/runner/flutter_window.cpp @@ -31,6 +31,11 @@ bool FlutterWindow::OnCreate() { this->Show(); }); + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + return true; }