replaceVarInStatement function

Statement replaceVarInStatement(
  1. String varName,
  2. Expression newValue,
  3. Statement statement
)

Implementation

Statement replaceVarInStatement(
    String varName, Expression newValue, Statement statement) {
  var transformer = _ReplaceVariableTransformer(varName, newValue);
  return statement.visitStatement(transformer, null);
}