FadeIn.themed constructor

FadeIn.themed({
  1. Key? key,
  2. required BuildContext context,
  3. required Widget child,
  4. Duration? duration,
  5. Duration delay = Duration.zero,
  6. Curve? curve,
  7. bool autoPlay = true,
  8. VoidCallback? onComplete,
  9. VoidCallback? onCancel,
  10. bool maintainState = true,
  11. bool respectSystemPreferences = true,
})

Create a fade-in animation using theme configuration

Implementation

factory FadeIn.themed({
  Key? key,
  required BuildContext context,
  required Widget child,
  Duration? duration,
  Duration delay = Duration.zero,
  Curve? curve,
  bool autoPlay = true,
  VoidCallback? onComplete,
  VoidCallback? onCancel,
  bool maintainState = true,
  bool respectSystemPreferences = true,
}) {
  final theme = FSTheme.of(context);
  final animationConfig = theme.animation;

  return FadeIn(
    key: key,
    child: child,
    duration: duration ?? animationConfig.duration,
    delay: delay,
    curve: curve ?? animationConfig.curve,
    autoPlay: autoPlay,
    onComplete: onComplete,
    onCancel: onCancel,
    maintainState: maintainState,
    respectSystemPreferences: respectSystemPreferences,
  );
}