curveOf static method
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;
}