fadeTo method

void fadeTo(
  1. Color color,
  2. double alpha, {
  3. bool family = true,
})

Implementation

void fadeTo(Color color, double alpha, {bool family = true}) {
  if (hasPoints()) {
    var newColor = interpolateValue(getColor(), color, alpha);
    setColor(color: newColor, family: false);
  }

  if (family) {
    for (var submob in submobjects) {
      submob.fadeTo(color, alpha, family: true);
    }
  }
}