SliverHitTestResult.wrap constructor

SliverHitTestResult.wrap(
  1. HitTestResult result
)

Wraps result to create a HitTestResult that implements the SliverHitTestResult protocol for hit testing on RenderSlivers.

This method is used by RenderObjects that adapt between the RenderSliver-world and the non-RenderSliver-world to convert a (subtype of) HitTestResult to a SliverHitTestResult for hit testing on RenderSlivers.

The HitTestEntry instances added to the returned SliverHitTestResult are also added to the wrapped result (both share the same underlying data structure to store HitTestEntry instances).

See also:

Implementation

SliverHitTestResult.wrap(super.result) : super.wrap();