How to create 2 Flutter (Windows Desktop) windows with separate engines and communicate between them?

I want to add a feature to our Windows Flutter application. If run with a 2nd external display connected, it will run 2 windows simultaneously. On the main display it will show the application full-screen and on the external display it will show a preview of what is being controlled on the primary window, also full-screen (similar to a Powerpoint Presentation with Presenter View on 2 monitors).

I found these two links which describe that this is certainly possible using windows/runner/main.cpp and windows/runner/run_loop.cpp in the project:

However, when adding the “Steps to Reproduce” in cjng96’s issue to my project, it runs successfully but only 1 window appears…

Furthermore, I am unsure about how to:

  • Specify a different Widget to be shown on the secondary display, and
  • How to create a communication between the two views

Alternatively, is this the best approach to achieve this dual-screen goal? Any help would be really appreciated.

Leave a Comment