TImage constructor
const
TImage({
- Key? key,
- String? image,
- File? file,
- BoxBorder? border,
- double? width = 56,
- double? height = 56,
- Uint8List? memoryImage,
- Color? overlayColor,
- required ImageType imageType,
- Color? backgroundColor,
- double? padding,
- double? margin,
- BoxFit? fit = BoxFit.contain,
- bool applyImageRadius = true,
- double? borderRadius,
- BoxShape imageShape = BoxShape.rectangle,
A customizable image widget with the option to display the image in a circular or rectangular shape.
imageType
determines the source of the image (network, memory, file, or asset).applyImageRadius
decides whether the image should have rounded corners.width
andheight
set the dimensions of the image.overlayColor
applies a color overlay on top of the image.backgroundColor
is the color of the background behind the image.padding
andmargin
control the space around the image.borderRadius
allows for custom rounding of the image corners.imageShape
you can set imageShape either BoxShape.circle OR BoxShape.rectangle.
Implementation
const TImage({
super.key,
this.image,
this.file,
this.border,
this.width = 56,
this.height = 56,
this.memoryImage,
this.overlayColor,
required this.imageType,
this.backgroundColor,
this.padding,
this.margin,
this.fit = BoxFit.contain,
this.applyImageRadius = true,
this.borderRadius,
this.imageShape = BoxShape.rectangle,
});