WeatherRainLayer class

WeatherRainLayer A post-process layer that simulates rainy glass refraction and blur over its child. Place it in a Stack between your background content and any foreground UI you want to keep sharp.

Inheritance

Constructors

WeatherRainLayer({Key? key, required Widget child, double? width, double? height, double rainAmount = 0.75, double maxBlur = 6.0, double minBlur = 2.0, double refraction = 40.0, double speed = 1.0, bool enabled = true, bool useBackdrop = false, bool lockToScreen = false})
const

Properties

child Widget
Content captured by the shader. Typically matches the area you want the rainy glass effect to cover.
final
enabled bool
When false, bypasses the shader and returns child directly.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Optional explicit height to enforce on the layer.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lockToScreen bool
When true in non-backdrop mode, the raindrop pattern is anchored to screen space, so it does not move when this widget scrolls. The effect is still applied to this widget's child only.
final
maxBlur double
Maximum blur radius (in pixels) for areas away from drops.
final
minBlur double
Minimum blur radius (in pixels) at the drops/trails.
final
rainAmount double
Overall rain intensity (0..1). Drives drop density and motion.
final
refraction double
Refraction strength (in pixels) applied to the underlying content.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speed double
Speed multiplier for the animation timeline.
final
useBackdrop bool
When true, use BackdropFilter + ImageFilter.shader to sample the pixels behind this widget (i.e. real backdrop). In this mode, child is rendered as the overlay content and is not used as the sampled image.
final
width double?
Optional explicit width to enforce on the layer.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<WeatherRainLayer>
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