1

I would like to make a Carousel slider in flutter with lines (look at the image), but always finding with dots.

Thanks in advance

Carousel slider with lines

3
  • 1
    Which library you are using ? show as some code about how the dots are there, from the library or you implemented it ? Commented Feb 9, 2021 at 14:21
  • You can try making you custom widget. You can start of with PageView widget to make a basic image slider. Then you can overlap the PageView with the row of lines to get the expected behaviour. Docs for PageView : api.flutter.dev/flutter/widgets/PageView-class.html Commented Feb 9, 2021 at 15:22
  • Indeed I'm using PageView widget , I found a solution with dots_indicator pub.dev/packages/dots_indicator Commented Feb 14, 2021 at 20:57

1 Answer 1

1

I found a solution with dots_indicator https://pub.dev/packages/dots_indicator

DotsIndicator(
              dotsCount: length ?? 0,
              position: currentIndexPage.toDouble(),
              decorator: DotsDecorator(
                  spacing: EdgeInsets.only(left: 3, right: 3),
                  shape: Border(),
                  activeShape: Border(),
                  size: Size(
                      (width - 50) / length, 5),
                  activeSize: Size(
                      (width - 50) / length, 5),
                  color: Colores().blanco(opacity: 0.4),
                  activeColor: Colores().blanco()),
            )
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.