replaceTemplate method
Replaces all instances of the specified id with the value returned by the template.
Note that you can use this function, combined with a AFDynamicSourceTemplate subclass, in order to insert dynamically generated sections of code in an existing template.
Implementation
void replaceTemplate(AFCommandContext context, dynamic id, AFSourceTemplate? template) {
if(template == null) {
buffer.replaceText(context, id, "");
return;
}
return buffer.replaceTemplate(context, id, template);
}