addGradient method

void addGradient(
  1. String id,
  2. DrawableGradient gradient
)

Add a DrawableGradient to the pre-defined collection by id.

Implementation

void addGradient(String id, DrawableGradient gradient) {
  assert(id != null); // ignore: unnecessary_null_comparison
  assert(gradient != null); // ignore: unnecessary_null_comparison
  _gradients[id] = gradient;
}