PhotoViewGallery.builder constructor
const
PhotoViewGallery.builder({
- Key? key,
- required int? itemCount,
- required PhotoViewGalleryBuilder? builder,
- LoadingBuilder? loadingBuilder,
- BoxDecoration? backgroundDecoration,
- bool wantKeepAlive = false,
- bool gaplessPlayback = false,
- bool reverse = false,
- PageController? pageController,
- PhotoViewGalleryPageChangedCallback? onPageChanged,
- ValueChanged<
PhotoViewScaleState> ? scaleStateChangedCallback, - bool enableRotation = false,
- ScrollPhysics? scrollPhysics,
- Axis scrollDirection = Axis.horizontal,
- Size? customSize,
- bool allowImplicitScrolling = false,
- bool pageSnapping = true,
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.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,
this.pageSnapping = true,
}) : pageOptions = null,
assert(itemCount != null),
assert(builder != null),
super(key: key);