ScrollAwareImageProvider<T extends Object> constructor

const ScrollAwareImageProvider<T extends Object>(
  1. {required DisposableBuildContext<State<StatefulWidget>> context,
  2. required ImageProvider<T> imageProvider}
)

Creates a ScrollAwareImageProvider.

The context object is the BuildContext of the State using this provider. It is used to determine scrolling velocity during resolve.

The imageProvider is used to create a key and load the image. It must not be null, and is assumed to interact with the cache in the normal way that ImageProvider.resolveStreamForKey does.

Implementation

const ScrollAwareImageProvider({
  required this.context,
  required this.imageProvider,
});