As outlined in this issue,
print
methods from Dart do not reflect on terminals on Windows.
To create a Flutter app that acts like a normal GUI app when launched from explorer
on windows, but can provide CLI capabilities, there's a need to redirect STD streams
using AttachConsole()
and freopen_s()
However, there is also a catch. _isatty()
is essential in not breaking flutter run