On Flutter desktop , I want to use multi monitors. Like when application started , I will see all monitors and click one of them ,then application will start the monitor that I selected. How can I do this?
Asked
Active
Viewed 1,630 times
2 Answers
2
Flutter currently has no built-in functionally to interact with monitors or windows; you would need to use a plugin. window_size
has the ability to list all of the individual screens and their coordinates and sizes, as well as to reposition the window containing your Flutter application.

smorgan
- 20,228
- 3
- 47
- 55
-
I am trying to do with c++ code , Is it possible? – Vysl Shn Dec 29 '21 at 08:04
-
1I'm not sure what you are asking. If you want to build the UI you are describing using some completely different toolkit, sure. There's nothing special about the application created by `flutter create`; it's a native application that happens to include Flutter content. So you'd do it exactly the same way you would do it if you weren't using Flutter. If that's your goal you should ask a new question with different tags, because there wouldn't be anything Flutter-specific about the answer. – smorgan Dec 29 '21 at 17:16
-
Firstly, thank u to answered to me and I gonna try window_size but I did'nt understand how to change monitor. Can u explane ? – Vysl Shn Dec 29 '21 at 21:41
-
2Monitors all exist in a single unified coordinate space; you put a window in a monitor by positioning it somewhere within that monitor's frame. – smorgan Dec 29 '21 at 22:58
-
@VyslShn have you implemented it? Can you show how to show multi monitor? – Miftakhul Arzak Aug 11 '22 at 06:39
0
The workaround that I found for this is that you can treat your monitors as an extended display. Then instead of using MediaQuery.of(context) for sizes, you make two widgets with the size of each monitor inside of a row. Since the monitors are side by side, both widgets are rendered properly on each monitor.

alexalejandroem
- 1,094
- 12
- 17