render abstract method

void render(
  1. Object? values,
  2. StringSink sink, {
  3. MissingVariableCallback? onMissingVariable,
})

values can be a combination of Map, List, String. Any non-String object will be converted using toString().

If a variable tag resolves to a missing value, onMissingVariable is called before strict or lenient missing-variable handling is applied. If the callback returns a string, that string is rendered in place of the missing variable. If it returns null, the existing behavior is kept: strict mode throws TemplateException, while lenient mode renders nothing.

Null values that are present in the data are rendered as empty strings.

Implementation

void render(
  Object? values,
  StringSink sink, {
  MissingVariableCallback? onMissingVariable,
});