cascadeIntervals static method
Creates a cascading stagger effect configuration.
Implementation
static List<Interval> cascadeIntervals(
int itemCount, {
double staggerAmount = 0.1,
Curve curve = Curves.easeOutCubic,
}) {
return List.generate(itemCount, (index) {
final start = (index * staggerAmount).clamp(0.0, 0.9);
final end = (start + (1.0 - start)).clamp(start, 1.0);
return Interval(start, end, curve: curve);
});
}