0
Process.run(
  'adb',
  ['devices],
  runInShell: true,
);

When I run the app in android studio, no black window, But when I double-click ***.exe to run the app, it will see the black window

nvoigt
  • 75,013
  • 26
  • 93
  • 142
jchenx2
  • 13
  • 2

1 Answers1

0

This is a Dart bug.

As described in the comments there, you can work around it for now by creating your own console at launch and hiding it:

if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
  CreateAndAttachConsole();
} else {
  AllocConsole();
  ShowWindow(GetConsoleWindow(), SW_HIDE);
}
smorgan
  • 20,228
  • 3
  • 47
  • 55