argumentBuilder property

  1. @override
List<String> get argumentBuilder
override

Generates the command-line arguments for the Flutter build command.

Returns a list of strings that will be passed to flutter build. Arguments are conditionally included based on their values.

Implementation

@override
List<String> get argumentBuilder => [
      // Include binary type if not empty
      if (binaryType.isNotEmpty) binaryType,
      // Include target file specification
      if (target?.isNotEmpty ?? false) '--target=$target',
      // Include build mode flag
      if (buildMode?.isNotEmpty ?? false) '--$buildMode',
      // Include flavor specification
      if (flavor?.isNotEmpty ?? false) '--flavor=$flavor',
      // Include Dart defines
      if (dartDefines?.isNotEmpty ?? false) '--dart-defines=$dartDefines',
      // Include Dart defines file
      if (dartDefinesFile?.isNotEmpty ?? false)
        '--dart-define-from-file=$dartDefinesFile',
      // Include build name/version
      if (buildName?.isNotEmpty ?? false) '--build-name=$buildName',
      // Include build number/version code
      if (buildNumber?.isNotEmpty ?? false) '--build-number=$buildNumber',
      // Include pub get flag
      if (pub) '--pub' else '--no-pub',
      // Include any custom arguments
      if (customArgs != null) ...customArgs!,
    ];
set argumentBuilder (List<String> value)
inherited

Raw list of command-line arguments before variable processing.

Subclasses should populate this list with the appropriate arguments for their specific job type.

Implementation

List<String> argumentBuilder = [];