runAppCommandlineOrGUI static method

Future<void> runAppCommandlineOrGUI({
  1. Widget? gui,
  2. Future<void> commandlineRun()?,
  3. required int argsCount,
  4. bool closeOnCompleteCommandlineOptionOnly = true,
  5. int commandlineExitSuccessCode = 0,
})

used to run the app in commandline or gui mode argsCount should be args.length from the main function the gui will load if 0 args are passed commandline mode will run if 1+ args are passed if the function is running wrong run: flutter pub run commandline_or_gui_windows:create. Throws an error if not windows

Implementation

static Future<void> runAppCommandlineOrGUI({
  Widget? gui,
  Future<void> Function()? commandlineRun,
  required int argsCount,
  bool closeOnCompleteCommandlineOptionOnly = true,
  int commandlineExitSuccessCode = 0,
}) async {
  throw UnsupportedError('Unsupported Platform');
}