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.
imageTypedetermines the source of the image (network, memory, file, or asset).applyImageRadiusdecides whether the image should have rounded corners.widthandheightset the dimensions of the image.overlayColorapplies a color overlay on top of the image.backgroundColoris the color of the background behind the image.paddingandmargincontrol the space around the image.borderRadiusallows for custom rounding of the image corners.imageShapeyou 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,
});