ScrollAwareImageProvider<T> constructor

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

Creates a ScrollingAwareImageProvider.

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

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,
}) : assert(context != null),
     assert(imageProvider != null);