CurvedAnimation constructor

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

Creates a curved animation.

Implementation

CurvedAnimation({
  required this.parent,
  required this.curve,
  this.reverseCurve,
}) {
  // TODO(polina-c): stop duplicating code across disposables
  // https://github.com/flutter/flutter/issues/137435
  if (kFlutterMemoryAllocationsEnabled) {
    FlutterMemoryAllocations.instance.dispatchObjectCreated(
      library: 'package:flutter/animation.dart',
      className: '$CurvedAnimation',
      object: this,
    );
  }
  _updateCurveDirection(parent.status);
  parent.addStatusListener(_updateCurveDirection);
}