ImageViewer constructor
ImageViewer({
- required double? width,
- required double? height,
- String? urlImage,
- String? assetImage,
- Widget? onErrorWidget,
- Widget? onLoadingWidget,
- Color? backgroundColor,
- Border? border,
- BoxShadow? shadow,
- BorderRadius? borderRadius,
- EdgeInsetsGeometry? margin,
- BoxFit? fit,
- BoxShape? shape,
- Object? tag,
- Duration? duration,
- int? maxSize,
- Map<
String, String> ? headers, - Key? key,
- IconData? errorIcon,
Implementation
ImageViewer({
required super.width,
required super.height,
super.urlImage,
super.assetImage,
super.onErrorWidget,
super.onLoadingWidget,
super.backgroundColor,
super.border,
super.shadow,
super.borderRadius,
final EdgeInsetsGeometry ? margin,
final BoxFit ? fit,
final BoxShape ? shape,
super.tag,
super.duration,
super.maxSize,
super.headers,
super.key,
super.errorIcon,
}) :
assert(urlImage == null || assetImage == null, "Only one image must be provided"),
assert(shape != BoxShape.circle || borderRadius == null, "If shape == BoxShape.circle, borderRadius must be null"),
super(
margin : margin ?? EdgeInsets.zero,
fit : fit ?? BoxFit.cover,
shape : shape ?? BoxShape.rectangle,
readOnly : true,
viewerBlur : false,
viewerBlurSigma : 0,
);