ImagePixels constructor

const ImagePixels({
  1. required ImageProvider<Object>? imageProvider,
  2. Color defaultColor = Colors.grey,
  3. required BuilderFromImage builder,
})

Lets you provide the imageProvider, the builder, as well as a defaultColor to be used when reading pixels outside the image (or while the image is downloading). If imageProvider is null, the image will be empty and it will all be painted with the defaultColor.

Implementation

const ImagePixels({
  required this.imageProvider,
  this.defaultColor = Colors.grey,
  required this.builder,
});