diff --git a/ui/flutter/windows/runner/main.cpp b/ui/flutter/windows/runner/main.cpp index 657a0070..2a5ee88a 100644 --- a/ui/flutter/windows/runner/main.cpp +++ b/ui/flutter/windows/runner/main.cpp @@ -65,6 +65,11 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, flutter::DartProject project(L"data"); + // TODO: Remove this. + // This forces Flutter to use a separate thread for Dart. + // This mode will be removed in a future version of Flutter. + project.set_ui_thread_policy(flutter::UIThreadPolicy::RunOnSeparateThread); + std::vector command_line_arguments = GetCommandLineArguments();