Monday, June 11, 2018

Image Carousel with Flutter framework with basic animation using VS Code

Note: We are not going to build a carousel/slider from scratch, instead we are going to use a package called carousel_pro. In future tutorials I will show, how to build a carousel from scratch and how we can publish as a package.


Source code for the image carousel/slider

pubspec.yaml


main.dart


Flutter developer wallpaper by slcoder - ego with coding:

7 comments:

  1. hey this carousel is awesome and i want to ask about how to get the image link? i want to tap the images and after that, it will move to another class and show the images

    ReplyDelete
    Replies
    1. Keep images location/address in separate list or variable and when the index change pass it to the class you want with constructor.

      Delete
  2. Hi, great example. How implements click action on tap item?

    ReplyDelete
    Replies
    1. Sorry for the late, you can wrap carousel with InkWell and implement a function for onTap

      Delete
  3. How we can add Text along with the image, some caption for each Individual Image

    ReplyDelete
    Replies
    1. For your situation there are some modifications to do if you use this package. I see now there are so many great Carousel packages like Swiper that you can use. Later I will post about that.

      Delete
  4. Thanks

    Your Code help me in my project

    ReplyDelete