Dart's io package has the Process.run command that allows you run terminal commands from Dart:
Process.run
In your case of taking screenshots of your app, you'd be doing something like:
import 'dart:io'; await Process.run('flutter', ['screenshot', '-o', 'image.jpg']);
If you're wanting to generate screenshots more directly from setting up integration tests, which is much faster than invoking flutter screenshot via a terminal command, here are some helpful references explaining how to take app snapshots via flutter's integration test framework:
https://medium.com/flutter-community/testing-flutter-ui-with-flutter-driver-c1583681e337
https://blog.codemagic.io/flutter-automated-screenshot-testing/
https://dev.to/mjablecnik/take-screenshot-during-flutter-integration-tests-435k
https://medium.com/@nocnoc/automated-screenshots-for-flutter-f78be70cd5fd
The limitation of taking screenshots this way, however, is that only the UI of your app will be captured, nothing else which might present outside of your app (e.g. local and push notifications, reminder alerts based on the OS's clock, calendar, etc, which your app may generate.)
On the other hand, using Process.run to execute flutter screenshot would be able to capture everything on the phone display, including notifications, system-based alerts, etc. Getting the timing right can be a little tricky, though, because it takes substantially longer for the terminal command to completely capture and save the screenshot. You'd still want to execute this in the context of an integration test driver in order to avoid system permissions issues.
Windowstag or mentioned in the post, you showed powershell and Windows' path.