imageAnimation function

dynamic imageAnimation(
  1. PageController animation,
  2. dynamic images,
  3. dynamic pagePosition
)

Implementation

imageAnimation(PageController animation, images, pagePosition) {
  return AnimatedBuilder(
    animation: animation,
    builder: (context, widget) {
      return SizedBox(
        // width: 200,
        // height: 200,
        child: widget,
      );
    },
    child: Container(
      margin: const EdgeInsets.all(10),
      child: Image.network(
        images[pagePosition],
      ),
    ),
  );
}