WidgetSnapshot class

Represents a snapshot of widget.

Constructors

WidgetSnapshot.image(Image? _image)
Creates a new widget snapshot backed by ui.Image. This is used on platforms that can rasterize widgets to images (Native + CanvasKit).
WidgetSnapshot.renderObject(RenderObject? _renderObject, Rect bounds)
Creates a new widget snapshot backed by a render object. bounds represents the part of the render object that should be visible.

Properties

debugKey Object?
Key used to create this snapshot.
getter/setter pair
debugRenderObjectRequested bool
no setter
hashCode int
The hash code for this object.
no setterinherited
image Image
Returns image representation of this snapshot.
no setter
isImage bool
Returns whether this is image backed widget snapshot.
no setter
isRenderObject bool
Returns whether this is render object backed widget snapshot.
no setter
onDisposed Listenable
no setter
onRenderObjectRequested Listenable
no setter
pointHeight double
no setter
pointSize Size
no setter
pointWidth double
no setter
renderObjectBounds Rect
Returns part of the render object represented by this snapshot.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
getRenderObject() RenderObject?
Returns render object representation of this snapshot. Note that this can only be called per snapshot. After that the render object is free to be disposed. If you need to use snapshot in multiple places (i.e. lift & drag having same image) use retain to increase the retain count.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retain() WidgetSnapshot
Increases the retain count of this snapshot. This allows using snapshot in multiple places (i.e. lift & drag having same image).
toString() String
A string representation of this object.
override

Operators

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