resolveCommand static method

Future<String> resolveCommand(
  1. String projectRoot, {
  2. String? configuredCommand,
})

Selects the configured build command or repository-aware default.

When configuredCommand is omitted, a project using a current or legacy FVM configuration runs fvm flutter; other projects run flutter directly. FVM configuration is discovered from projectRoot up to the nearest Git repository boundary.

Implementation

static Future<String> resolveCommand(
  String projectRoot, {
  String? configuredCommand,
}) async {
  if (configuredCommand != null) return configuredCommand;
  final executable = await FlutterToolchain.resolveExecutable(projectRoot);
  return '$executable build ipa --release';
}