CyberImage constructor

const CyberImage({
  1. Key? key,
  2. dynamic text,
  3. String? label,
  4. dynamic isUpload = false,
  5. dynamic isView = true,
  6. dynamic isDelete = false,
  7. double? width,
  8. double? height = 200,
  9. dynamic fit = "cover",
  10. double borderRadius = 12.0,
  11. Widget? placeholder,
  12. Widget? errorWidget,
  13. TextStyle? labelStyle,
  14. bool isShowLabel = true,
  15. ValueChanged<String>? onChanged,
  16. dynamic onLeaver(
    1. dynamic
    )?,
  17. Color? backgroundColor,
  18. Color? borderColor,
  19. double borderWidth = 2.0,
  20. bool enabled = true,
  21. dynamic isVisible = true,
  22. bool enableCompression = true,
  23. int compressionQuality = 85,
  24. int? maxWidth = 1920,
  25. int? maxHeight = 1920,
  26. IconData? uploadIcon,
  27. IconData? viewIcon,
  28. IconData? deleteIcon,
  29. bool isCircle = false,
})

Implementation

const CyberImage({
  super.key,
  this.text,
  this.label,
  this.isUpload = false,
  this.isView = true,
  this.isDelete = false,
  this.width,
  this.height = 200,
  this.fit = "cover", // Default is cover
  this.borderRadius = 12.0,
  this.placeholder,
  this.errorWidget,
  this.labelStyle,
  this.isShowLabel = true,
  this.onChanged,
  this.onLeaver,
  this.backgroundColor,
  this.borderColor,
  this.borderWidth = 2.0,
  this.enabled = true,
  this.isVisible = true,
  this.enableCompression = true,
  this.compressionQuality = 85,
  this.maxWidth = 1920,
  this.maxHeight = 1920,
  this.uploadIcon,
  this.viewIcon,
  this.deleteIcon,
  this.isCircle = false,
});