FlowFieldBackground constructor
const
FlowFieldBackground({ - Key? key,
- int particleCount = 2000,
- double noiseScale = 0.003,
- double noiseSpeed = 0.15,
- double particleSpeed = 40.0,
- double turnResponsiveness = 4.0,
- double lineWidth = 1.2,
- double segmentSeconds = 1 / 50.0,
- bool wrap = true,
- Color backgroundColor = Colors.black,
- Color colorA = const Color(0xFF00FFC6),
- Color colorB = const Color(0xFF8A6BFF),
- double opacity = 0.65,
- Widget? child,
- int? seed,
})
Implementation
const FlowFieldBackground({
super.key,
this.particleCount = 2000,
this.noiseScale = 0.003, // field spatial frequency (smaller => larger swirls)
this.noiseSpeed = 0.15, // how fast the field animates over time
this.particleSpeed = 40.0, // pixels/sec baseline
this.turnResponsiveness = 4.0,// how quickly particles align to field
this.lineWidth = 1.2,
this.segmentSeconds = 1 / 50.0, // segment length (sec) per frame
this.wrap = true, // wrap around edges (continuous) or bounce
this.backgroundColor = Colors.black,
this.colorA = const Color(0xFF00FFC6),
this.colorB = const Color(0xFF8A6BFF),
this.opacity = 0.65, // global paint alpha for strokes
this.child,
this.seed,
});