recommendDeferredLoading method

bool recommendDeferredLoading(
  1. BuildContext context
)

Provides a heuristic to determine if expensive frame-bound tasks should be deferred.

The actual work of this is delegated to the physics via ScrollPhysics.recommendDeferredLoading called with the current activity's ScrollActivity.velocity.

Returning true from this method indicates that the ScrollPhysics evaluate the current scroll velocity to be great enough that expensive operations impacting the UI should be deferred.

Implementation

bool recommendDeferredLoading(BuildContext context) {
  assert(activity != null);
  return physics.recommendDeferredLoading(
    activity!.velocity + _impliedVelocity,
    copyWith(),
    context,
  );
}