TImage class
Constructors
-
TImage.new({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.
const
Properties
-
applyImageRadius
→ bool
-
Whether to apply a border radius to the image corners. If true, the image corners will be rounded based on borderRadius.
final
-
backgroundColor
→ Color?
-
The background color behind the image. This color will show behind the image when the image has transparency or is not provided.
final
-
border
→ BoxBorder?
-
The border for the container around the image. Allows you to add a border around the image.
final
-
borderRadius
→ double?
-
The radius of the image corners when applyImageRadius is true. Used to control the roundness of the corners.
final
-
file
→ File?
-
The image file to be loaded. This is used when imageType is ImageType.file.
final
-
fit
→ BoxFit?
-
Determines how the image should be resized to fit within its container. BoxFit.contain by default, but can be customized.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
height
→ double?
-
The height of the image. If not provided, it defaults to 56.
final
-
image
→ String?
-
The URL of the image to be loaded from the network. This is used when imageType is ImageType.network.
final
-
imageShape
→ BoxShape
-
Whether the image should have rounded corners or be rectangular. BoxShape.circle for circular shape, BoxShape.rectangle for rectangular.
final
-
imageType
→ ImageType
-
The type of image source (network, memory, file, or asset). Used to determine the correct widget to load the image from.
final
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
margin
→ double?
-
The margin around the image. This adds space around the container of the image itself.
final
-
memoryImage
→ Uint8List?
-
Image data that is loaded into memory. This is used when imageType is ImageType.memory.
final
-
overlayColor
→ Color?
-
A color that is overlay on top of the image. This can be used to add a tint or filter effect to the image.
final
-
padding
→ double?
-
The padding around the image inside its container. This is used to add space between the image and the container's edge.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
width
→ double?
-
The width of the image. If not provided, it defaults to 56.
final