CurvedAnimation constructor Null safety

CurvedAnimation(
  1. {required Animation<double> parent,
  2. required Curve curve,
  3. Curve? reverseCurve}
)

Creates a curved animation.

The parent and curve arguments must not be null.

Implementation

CurvedAnimation({
  required this.parent,
  required this.curve,
  this.reverseCurve,
}) : assert(parent != null),
     assert(curve != null) {
  _updateCurveDirection(parent.status);
  parent.addStatusListener(_updateCurveDirection);
}