wrapDoubleQuotes method

String wrapDoubleQuotes({
  1. bool quoteEmpty = false,
})

Wraps the string in double quotes: "string".

If the string is empty, returns "" if quoteEmpty is true, otherwise returns an empty string.

Implementation

String wrapDoubleQuotes({bool quoteEmpty = false}) => isEmpty
    ? quoteEmpty
          ? '""'
          : ''
    : '"$this"';