RenderTextureView class
Displays a live RenderTexture in the widget tree.
The widget repaints whenever the target re-renders (per its
RenderTexture.update policy) and shows nothing until the first render
completes. It fills the constraints it is given, scaling the texture
with fit.
final minimap = RenderTexture(width: 480, height: 270);
scene.views.add(RenderView(camera: topCamera, target: minimap));
// ... in the widget tree, typically stacked over the SceneView:
SizedBox(width: 240, height: 135, child: RenderTextureView(minimap))
With followLayout enabled, the target is resized to match the widget's layout size (times the device pixel ratio), so the capture is always rendered at display resolution. Off by default, so a fixed-size target is never silently reallocated by layout changes.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- RenderTextureView
Constructors
- RenderTextureView(RenderTexture renderTexture, {Key? key, BoxFit fit = BoxFit.contain, FilterQuality filterQuality = FilterQuality.medium, bool followLayout = false})
-
Displays
renderTexture, repainting whenever it re-renders.const
Properties
- filterQuality → FilterQuality
-
The sampling quality the texture is drawn with.
final
- fit → BoxFit
-
How the texture is inscribed into the widget's bounds.
final
- followLayout → bool
-
Whether to resize renderTexture to the widget's layout size (times
the device pixel ratio). See the class doc.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- renderTexture → RenderTexture
-
The render target to display.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< RenderTextureView> -
Creates the mutable state for this widget at a given location in the tree.
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
-
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