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
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
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);
}