ClampedAnimation constructor

const ClampedAnimation({
  1. required Animation<double> parent,
  2. required double min,
  3. required double max,
})

Creates a clamped animation with an invariant range.

The parent animation is the source of values for this animation. The min and max parameters specify the range within which the values of the parent animation should be clamped. The constructor asserts that min is less than max.

Implementation

const ClampedAnimation({
  required this.parent,
  required this.min,
  required this.max,
}) : assert(min < max, 'The min value must be less than the max value.');