TImage constructor

const TImage({
  1. Key? key,
  2. String? url,
  3. Uint8List? bytes,
  4. double? size,
  5. double? width,
  6. double? height,
  7. double? aspectRatio,
  8. AlignmentGeometry alignment = Alignment.center,
  9. double previewSize = 350,
  10. String placeholder = 'package:te_widgets/assets/icons/no_image.png',
  11. ShapeBorder border = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))),
  12. double padding = 5,
  13. BoxFit fit = BoxFit.cover,
  14. Color? color,
  15. String? title,
  16. String? subTitle,
  17. Color? titleColor,
  18. Color? subTitleColor,
  19. bool disabled = false,
  20. VoidCallback? onShow,
  21. VoidCallback? onHide,
  22. String? cacheKey,
  23. BaseCacheManager? cacheManager,
  24. TextOverflow? textOverflow,
  25. int? maxLines,
  26. bool forceCache = false,
  27. bool showTitleSubtitleOverlayOnHover = false,
  28. bool overlayTitleSubtitle = false,
  29. VoidCallback? onTap,
})

Creates an image widget.

Implementation

const TImage({
  super.key,
  this.url,
  this.bytes,
  this.size,
  this.width,
  this.height,
  this.aspectRatio,
  this.alignment = Alignment.center,
  this.previewSize = 350,
  this.placeholder = 'package:te_widgets/assets/icons/no_image.png',
  this.border = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))),
  this.padding = 5,
  this.fit = BoxFit.cover,
  this.color,
  this.title,
  this.subTitle,
  this.titleColor,
  this.subTitleColor,
  this.disabled = false,
  this.onShow,
  this.onHide,
  this.cacheKey,
  this.cacheManager,
  this.textOverflow,
  this.maxLines,
  this.forceCache = false,
  this.showTitleSubtitleOverlayOnHover = false,
  this.overlayTitleSubtitle = false,
  this.onTap,
});