fade method

  1. @override
void fade({
  1. double darkness = 0.5,
  2. bool family = true,
})
override

Implementation

@override
void fade({double darkness = 0.5, bool family = true}) {
  var factor = 1 - darkness;

  setFill(colors: [
    for (var color in getFillColors())
      color.withTransparency(color.a * factor)
  ], family: true);
  setStroke(colors: [
    for (var color in getStrokeColors())
      color.withTransparency(color.a * factor)
  ], family: true);
  setBackgroundStroke(colors: [
    for (var color in getStrokeColors(background: true))
      color.withTransparency(color.a * factor)
  ], family: true);

  super.fade(darkness: darkness, family: family);
}