buildApp method

Future<int> buildApp()

Builds the Flutter application.

This method executes the flutter build command with the options specified by buildMode and verbose. The method returns the exit code of the flutter build command.

Implementation

Future<int> buildApp() async {
  final mode = buildMode.name;
  final process = await Process.start(
    "flutter",
    [
      'build',
      'windows',
      '--$mode',
    ],
    runInShell: true,
    mode: verbose ? ProcessStartMode.inheritStdio : ProcessStartMode.normal,
  );
  return process.exitCode;
}