createGridItemFadeAnimation function

Animation<double>? createGridItemFadeAnimation({
  1. required bool enable,
  2. required AnimationController animateController,
})

Create GridItem slideAnimation (from -> end)

Implementation

Animation<double>? createGridItemFadeAnimation({
  required bool enable,
  required AnimationController animateController,
}) {
  if (enable) {
    Tween<double> tween = Tween(
      begin: 0.0,
      end: 1.0,
    );

    return tween.animate(
      CurvedAnimation(
        parent: animateController,
        curve: Curves.easeOut,
      ),
    );
  }

  return null;
}