of static method

Animation<double> of(
  1. BuildContext context
)

The nearest ToolTransition's animation; stopped at 1 when there is none.

Implementation

static Animation<double> of(BuildContext context) {
  final widget = context.dependOnInheritedWidgetOfExactType<ToolTransition>();
  return widget?.animation ?? const AlwaysStoppedAnimation<double>(1.0);
}