ImageViewer.square constructor

ImageViewer.square({
  1. Future<void> onTap()?,
  2. String? htmlImage,
  3. String? assetImage,
  4. bool? alive,
  5. double? dimension,
  6. Widget? emptyWidget,
  7. Widget? filledWidget,
  8. Widget? onErrorWidget,
  9. Widget? onLoadingWidget,
  10. EdgeInsetsGeometry? margin,
  11. Color? backgroundColor,
  12. BorderRadius? borderRadius,
  13. Border? border,
  14. BoxShadow? shadow,
  15. BoxFit? fit,
  16. Map<String, String>? headers,
  17. Object? tag,
  18. Duration? duration,
  19. int? maxSize,
})

Implementation

factory ImageViewer.square({
  final Future<void> Function() ? onTap,
  final String                  ? htmlImage,
  final String                  ? assetImage,
  final bool                    ? alive,
  final double                  ? dimension,
  final Widget                  ? emptyWidget,
  final Widget                  ? filledWidget,
  final Widget                  ? onErrorWidget,
  final Widget                  ? onLoadingWidget,
  final EdgeInsetsGeometry      ? margin,
  final Color                   ? backgroundColor,
  final BorderRadius            ? borderRadius,
  final Border                  ? border,
  final BoxShadow               ? shadow,
  final BoxFit                  ? fit,
  final Map<String, String>     ? headers,
  final Object                  ? tag,
  final Duration                ? duration,
  final int                     ? maxSize,
}) =>
ImageViewer(
  onTap           : onTap,
  htmlImage       : htmlImage,
  assetImage      : assetImage,
  alive           : alive,
  width           : dimension,
  height          : dimension,
  onErrorWidget   : onErrorWidget,
  onLoadingWidget : onLoadingWidget,
  margin          : margin,
  backgroundColor : backgroundColor,
  borderRadius    : borderRadius,
  border          : border,
  shadow          : shadow,
  fit             : fit ?? BoxFit.cover,
  shape           : BoxShape.rectangle,
  headers         : headers,
  tag             : tag,
  duration        : duration ?? Duration(milliseconds: 250),
  maxSize         : maxSize,
);