PhotoViewGallery constructor Null safety

const PhotoViewGallery(
  1. {Key? key,
  2. required List<PhotoViewGalleryPageOptions>? pageOptions,
  3. LoadingBuilder? loadingBuilder,
  4. BoxDecoration? backgroundDecoration,
  5. bool wantKeepAlive = false,
  6. bool gaplessPlayback = false,
  7. bool reverse = false,
  8. PageController? pageController,
  9. PhotoViewGalleryPageChangedCallback? onPageChanged,
  10. ValueChanged<PhotoViewScaleState>? scaleStateChangedCallback,
  11. bool enableRotation = false,
  12. ScrollPhysics? scrollPhysics,
  13. Axis scrollDirection = Axis.horizontal,
  14. Size? customSize,
  15. bool allowImplicitScrolling = false}
)

Construct a gallery with static items through a list of PhotoViewGalleryPageOptions.

Implementation

const PhotoViewGallery({
  Key? key,
  required this.pageOptions,
  this.loadingBuilder,
  this.backgroundDecoration,
  this.wantKeepAlive = false,
  this.gaplessPlayback = false,
  this.reverse = false,
  this.pageController,
  this.onPageChanged,
  this.scaleStateChangedCallback,
  this.enableRotation = false,
  this.scrollPhysics,
  this.scrollDirection = Axis.horizontal,
  this.customSize,
  this.allowImplicitScrolling = false,
})  : itemCount = null,
      builder = null,
      super(key: key);