addAssist method

void addAssist(
  1. AssistKind kind,
  2. ChangeBuilder builder, {
  3. List<Object>? args,
})

Add an assist. Use the kind of the assist to get the message and priority, and use the change builder to get the edits that comprise the assist. If the message has parameters, then use the list of args to populate the message.

Implementation

void addAssist(AssistKind kind, ChangeBuilder builder, {List<Object>? args}) {
  var change = builder.sourceChange;
  if (change.edits.isEmpty) {
    return;
  }
  change.id = kind.id;
  change.message = formatList(kind.message, args);
  collector.addAssist(PrioritizedSourceChange(kind.priority, change));
}