TImage class

Inheritance

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

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited