getOptionBuildName method

String getOptionBuildName()

Gets the build name option formatted for command-line usage.

Returns:

  • '--build-name=value' if the option is provided
  • Empty string if the option is not provided

Example:

final buildNameFlag = argResults.getOptionBuildName();
// Returns '--build-name=1.0.0' or ''

Implementation

String getOptionBuildName() =>
    this?['build-name'] != null ? '--build-name=${this!['build-name']}' : '';