build method

  1. @override
void build()
override

Declares this node's children and behavior.

Runs once on mount, and again whenever the code reassembles.

super.build() is required, as skipping it drops whatever the superclass declared.

Implementation

@override
void build() {
  super.build();
  final base = _base ?? paint.color.a;

  onProgress((progress) {
    paint.color = paint.color.withValues(alpha: base + _span * progress);
  });
}