SliverVisibilityDetector constructor

const SliverVisibilityDetector({
  1. required Key key,
  2. required Widget sliver,
  3. required VisibilityChangedCallback? onVisibilityChanged,
})

Constructor.

key is required to properly identify this widget; it must be unique among all VisibilityDetector and SliverVisibilityDetector widgets.

onVisibilityChanged may be null to disable this SliverVisibilityDetector.

Implementation

const SliverVisibilityDetector({
  required Key key,
  required Widget sliver,
  required this.onVisibilityChanged,
})  : super(key: key, child: sliver);