flutterCurveOf function

Curve flutterCurveOf(
  1. MotionCurve curve
)

The Flutter curve for a MotionCurve.

Implementation

Curve flutterCurveOf(MotionCurve curve) => switch (curve) {
  MotionCurve.linear => Curves.linear,
  MotionCurve.easeInOut => Curves.easeInOut,
  MotionCurve.easeOut => Curves.easeOut,
  MotionCurve.easeIn => Curves.easeIn,
  MotionCurve.easeOutBack => Curves.easeOutBack,
  MotionCurve.easeOutCubic => Curves.easeOutCubic,
  MotionCurve.easeInOutSine => Curves.easeInOutSine,
  MotionCurve.easeInOutCubic => Curves.easeInOutCubic,
  MotionCurve.spring => const SpringCurve(),
  MotionCurve.elasticOut => Curves.elasticOut,
  MotionCurve.bounceOut => Curves.bounceOut,
  MotionCurve.fastOutSlowIn => Curves.fastOutSlowIn,
  MotionCurve.step => const Threshold(0.5),
};