wrapGestureWidget method

Widget wrapGestureWidget(
  1. Widget child, {
  2. double? imageWidth,
  3. double? imageHeight,
  4. BoxFit? imageFit,
  5. Rect? rect,
  6. bool copy = false,
})
inherited

Implementation

Widget wrapGestureWidget(
  Widget child, {
  double? imageWidth,
  double? imageHeight,
  BoxFit? imageFit,
  Rect? rect,
  bool copy = false,
}) {
  child = CustomSingleChildLayout(
    delegate: GestureWidgetDelegateFromState(
      this,
      imageWidth: imageWidth,
      imageHeight: imageHeight,
      imageFit: imageFit,
      rect: rect,
      copy: copy,
    ),
    child: child,
  );

  if (extendedImageSlidePageState != null) {
    child = widget.extendedImageState.imageWidget.heroBuilderForSlidingPage
            ?.call(child) ??
        child;
    if (extendedImageSlidePageState!.widget.slideType ==
        SlideType.onlyImage) {
      child = Transform.translate(
        offset: extendedImageSlidePageState!.offset,
        child: Transform.scale(
          scale: extendedImageSlidePageState!.scale,
          child: child,
        ),
      );
    }
  }

  return child;
}