curveOf static method

Curve curveOf(
  1. BuildContext context
)

Return the ambient AnimationDefaults.curve, or Curves.fastOutSlowIn if there is no ambient AnimationDefaults or if the nearest AnimationDefaults has a null curve.

Implementation

static Curve curveOf(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<AnimationDefaults>()?.curve ?? Curves.fastOutSlowIn;
}