RibbonBackground class

Material 3–inspired animated ribbon background.

Features:

  • Multiple horizontal ribbons with sine-based flow
  • Elevation: shadow + surface tint (M3-style)
  • Translucency and optional backdrop blur
  • Adaptive blending for light/dark backgrounds
  • Animated gradients (hue drift)
  • 3D parallax (drag/touch)
Inheritance

Constructors

RibbonBackground.new({Key? key, Color backgroundColor = Colors.transparent, List<RibbonSpec>? ribbonSpecs, int ribbonCount = 3, double baseAmplitude = 56.0, double speed = 0.5, double parallaxDepth = 0.22, double colorShiftSpeed = 0.08, bool enableBackdropBlur = true, double backdropBlurSigma = 8.0, Widget? child, Color? primaryForTint})
const

Properties

backdropBlurSigma double
final
backgroundColor Color
Page background behind ribbons.
final
baseAmplitude double
Baseline vertical wave amplitude.
final
child Widget?
Optional foreground child.
final
colorShiftSpeed double
Speed of animated hue shift in gradients.
final
enableBackdropBlur bool
Adds a real backdrop blur behind ribbons (Material translucency feel).
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
parallaxDepth double
Parallax amount (0..1).
final
primaryForTint Color?
Source color for surface tint at elevation. If null, taken from first ribbon's gradient.
final
ribbonCount int
How many ribbons to auto-generate if ribbonSpecs is null.
final
ribbonSpecs List<RibbonSpec>?
Optional explicit ribbon specs; if null, defaults are generated from palette.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speed double
Global time speed for animation.
final

Methods

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