appendVariable method

SnippetString appendVariable(
  1. String name,
  2. Object defaultValue
)

Builder-function that appends a variable (${VAR}) to the {@linkcode SnippetString.value value} of this snippet string.

@param name The name of the variable - excluding the $. @param defaultValue The default value which is used when the variable name cannot be resolved - either a string or a function with which a nested snippet can be created. @returns This snippet string.

Implementation

_i3.SnippetString appendVariable(
  _i2.String name,
  _i2.Object defaultValue,
) =>
    _i5.callMethod(
      this,
      'appendVariable',
      [
        name,
        defaultValue,
      ],
    );