ImageView constructor

ImageView({
  1. Key? key,
  2. FormFieldValidator<String>? validator,
  3. required String url,
  4. ImageType? imageType,
  5. double? size,
  6. double? height,
  7. double? width,
  8. EdgeInsets? imagePadding,
  9. BoxFit? fit,
  10. dynamic onTap()?,
  11. double? radius,
  12. Color? tintColor,
  13. EdgeInsets? margin,
  14. bool hasBorder = false,
  15. Color? bgColor,
  16. double? radiusWidth,
  17. Color? borderColor,
  18. EdgeInsets? padding,
  19. String? defaultImage,
  20. 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,
    );
  },
);