sample method

void sample(
  1. double luma
)

A new reading of the backdrop's luma under the bar. The first one takes effect at once; later ones after a moment, and animate.

Implementation

void sample(double luma) {
  debugOnChange?.call(this, 'sample ${luma.toStringAsFixed(4)}');
  if (!_sampled) {
    _sampled = true;
    _luma = luma;
    _decide();
    _snap();
    return;
  }
  _pending.add((null, luma));
}