ImageView constructor
ImageView({
- Key? key,
- FormFieldValidator<
String> ? validator, - required String url,
- ImageType? imageType,
- double? size,
- double? height,
- double? width,
- EdgeInsets? imagePadding,
- BoxFit? fit,
- dynamic onTap()?,
- double? radius,
- Color? tintColor,
- EdgeInsets? margin,
- bool hasBorder = false,
- Color? bgColor,
- double? radiusWidth,
- Color? borderColor,
- EdgeInsets? padding,
- String? defaultImage,
- bool hasGradient = false,
Implementation
ImageView({
super.key,
super.validator,
required String url,
ImageType? imageType,
double? size,
double? height,
double? width,
EdgeInsets? imagePadding,
BoxFit? fit,
dynamic Function()? onTap,
double? radius,
Color? tintColor,
EdgeInsets? margin,
bool hasBorder = false,
Color? bgColor,
double? radiusWidth,
Color? borderColor,
EdgeInsets? padding,
String? defaultImage,
bool hasGradient = false,
}) : super(
builder: (FormFieldState<String> state) {
return ImageViewContent(
url: url,
imageType: imageType,
size: size,
height: height,
width: width,
imagePadding: imagePadding,
fit: fit,
onTap: onTap,
radius: radius,
tintColor: tintColor,
margin: margin,
hasBorder: hasBorder,
borderColor: borderColor,
bgColor: bgColor,
radiusWidth: radiusWidth,
padding: padding,
hasGradient: hasGradient,
defaultImage: defaultImage,
error: state.errorText,
);
},
);