RawImage class

A widget that displays a dart:ui.Image directly.

The image is painted using paintImage, which describes the meanings of the various fields on this class in more detail.

The image is not disposed of by this widget. Creators of the widget are expected to call Image.dispose on the image once the RawImage is no longer buildable.

This widget is rarely used directly. Instead, consider using Image.

Inheritance

Constructors

RawImage({Key? key, Image? image, String? debugImageLabel, double? width, double? height, double scale = 1.0, Color? color, Animation<double>? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool invertColors = false, FilterQuality filterQuality = FilterQuality.low, bool isAntiAlias = false})
const

Properties

alignment AlignmentGeometry
How to align the image within its bounds.
finalinherited
centerSlice Rect?
The center slice for a nine-patch image.
finalinherited
color Color?
If non-null, this color is blended with each image pixel using colorBlendMode.
finalinherited
colorBlendMode BlendMode?
Used to combine color with this image.
finalinherited
debugImageLabel String?
A string identifying the source of the image.
finalinherited
filterQuality FilterQuality
Used to set the filterQuality of the image.
finalinherited
fit BoxFit?
How to inscribe the image into the space allocated during layout.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
height double?
If non-null, require the image to have this height.
finalinherited
image Image?
The image to display.
finalinherited
invertColors bool
Whether the colors of the image are inverted when drawn.
finalinherited
isAntiAlias bool
Whether to paint the image with anti-aliasing.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
matchTextDirection bool
Whether to paint the image in the direction of the TextDirection.
finalinherited
opacity Animation<double>?
If non-null, the value from the Animation is multiplied with the opacity of each image pixel before painting onto the canvas.
finalinherited
repeat ImageRepeat
How to paint any portions of the layout bounds not covered by the image.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
The linear scale factor for drawing this image at its intended size.
finalinherited
width double?
If non-null, require the image to have this width.
finalinherited

Methods

createElement() LeafRenderObjectElement
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
createRenderObject(BuildContext context) → RenderImagePixelSnap
Creates an instance of the RenderObject class that this RenderObjectWidget represents, using the configuration described by this RenderObjectWidget.
override
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
didUnmountRenderObject(covariant RenderImage renderObject) → void
A render object previously associated with this widget has been removed from the tree. The given RenderObject will be of the same type as returned by this object's createRenderObject.
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
updateRenderObject(BuildContext context, covariant RenderImagePixelSnap renderObject) → void
Copies the configuration described by this RenderObjectWidget to the given RenderObject, which will be of the same type as returned by this object's createRenderObject.
override

Operators

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