TImage constructor

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

Creates an image widget.

Implementation

const TImage({
  super.key,
  this.url,
  this.bytes,
  this.size = 80,
  this.previewSize = 350,
  this.aspectRatio = 1,
  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,
});