PhotoViewGallery.builder constructor

const PhotoViewGallery.builder({
  1. Key? key,
  2. required int? itemCount,
  3. required PhotoViewGalleryBuilder? builder,
  4. LoadingBuilder? loadingBuilder,
  5. BoxDecoration? backgroundDecoration,
  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 dynamic items.

The builder must return a PhotoViewGalleryPageOptions.

Implementation

const PhotoViewGallery.builder({
  Key? key,
  required this.itemCount,
  required this.builder,
  this.loadingBuilder,
  this.backgroundDecoration,
  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,
})  : pageOptions = null,
      assert(itemCount != null),
      assert(builder != null),
      super(key: key);