CloudShader class
A reusable animated cloud background powered by fragment shaders.
Wrap any widget with CloudShader to render animated clouds behind it. You can choose between a noise-based realistic style or a stylised toon look through style.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CloudShader
Constructors
- CloudShader({Key? key, CloudShaderStyle style = CloudShaderStyle.realistic, Widget? child, double? width, double? height, bool enabled = true, bool animate = true, double animationSpeed = 1.0, double cloudDensity = 1.0, double noisiness = 0.35, double flowSpeed = 0.1, double cloudHeight = 2.5, double brightness = 1.0, CloudColorPreset colorPreset = CloudColorPreset.stormy, double windSpeed = 1.0, double blurScale = 1.0, Color? skyColor, Color? cloudColor, double opacity = 1.0})
-
const
Properties
- animate → bool
-
Controls whether the shader timeline animates.
final
- animationSpeed → double
-
Multiplier applied to the timeline progression.
final
- blurScale → double
-
Toon style: scales the blur threshold for the puff shapes.
final
- brightness → double
-
Realistic style: overall brightness multiplier.
final
- child → Widget?
-
Optional child rendered on top of the cloud background.
final
- cloudColor → Color?
-
Primary cloud color; defaults depend on style.
final
- cloudDensity → double
-
Realistic style: overall density of the clouds.
final
- cloudHeight → double
-
Realistic style: inverse height of the vertical gradient.
final
- colorPreset → CloudColorPreset
-
Pre-configured color palette for both cloud styles.
final
- enabled → bool
-
When false, the shader is bypassed and only child is shown.
final
- flowSpeed → double
-
Realistic style: noise scroll speed used inside the shader.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Optional explicit height.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- noisiness → double
-
Realistic style: strength of the offset noise.
final
- opacity → double
-
Overall opacity of the cloud layer (0 = fully transparent, 1 = opaque).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skyColor → Color?
-
Base sky color; defaults depend on style.
final
- style → CloudShaderStyle
-
Determines which shader asset to use.
final
- width → double?
-
Optional explicit width.
final
- windSpeed → double
-
Toon style: wind speed multiplier that drives horizontal motion.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CloudShader> -
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