FSSequentialAnimation.fadeIn constructor
FSSequentialAnimation.fadeIn({
- Key? key,
- required List<
Widget> children, - Duration stepDuration = const Duration(milliseconds: 400),
- Duration stepDelay = const Duration(milliseconds: 200),
- Curve curve = Curves.easeOut,
- bool autoPlay = true,
- String? semanticLabel,
- VoidCallback? onComplete,
- VoidCallback? onStart,
- bool respectSystemPreferences = true,
Create a simple fade-in sequential animation
Implementation
factory FSSequentialAnimation.fadeIn({
Key? key,
required List<Widget> children,
Duration stepDuration = const Duration(milliseconds: 400),
Duration stepDelay = const Duration(milliseconds: 200),
Curve curve = Curves.easeOut,
bool autoPlay = true,
String? semanticLabel,
VoidCallback? onComplete,
VoidCallback? onStart,
bool respectSystemPreferences = true,
}) {
final totalDuration = Duration(
milliseconds: (stepDuration.inMilliseconds + stepDelay.inMilliseconds) *
children.length);
return FSSequentialAnimation(
key: key,
children: children,
sequence: FSAnimationSequence(
duration: totalDuration,
curve: curve,
steps: List<FSAnimationStep>.generate(
children.length,
(index) => FSAnimationStep(
animation: FSAnimation(
duration: stepDuration,
curve: curve,
),
delay: Duration(milliseconds: stepDelay.inMilliseconds * index),
),
),
),
autoPlay: autoPlay,
semanticLabel: semanticLabel,
onComplete: onComplete,
onStart: onStart,
respectSystemPreferences: respectSystemPreferences,
);
}