getFlagSourceMaps method

String getFlagSourceMaps()

Gets the source maps flag value formatted for command-line usage.

Returns:

  • '--source-maps' if the flag is set to true
  • Empty string if the flag is set to false or not provided

Example:

final sourceMapsFlag = argResults.getFlagSourceMaps();
// Returns '--source-maps' or ''

Implementation

String getFlagSourceMaps() =>
    this?['source-maps'] ?? false ? '--source-maps' : '';