Expression.fromExpression(Expression expr)

Creates a new linear Expression by copying the terms and constant of another expression.

Source

Expression.fromExpression(Expression expr)
  : this.terms = new List<Term>.from(expr.terms),
    this.constant = expr.constant;