valueAt method

int valueAt(
  1. double t
)

The 32-bit ARGB value at life progress t, which is clamped to 0...1.

The value is read from an Int32List, so it may be negative when interpreted as a signed integer; mask with 0xffffffff before passing it to a Color constructor.

Implementation

int valueAt(double t) {
  return _lut[(t.clamp(0.0, 1.0) * (_resolution - 1)).toInt()];
}