GithubHelp home page GithubHelp logo

Comments (6)

nixrajput avatar nixrajput commented on May 23, 2024

Hi @stormenergy91,

Thank you for using this package.

I will look into this issue and will fix it in the next update.

Thanks again for raising the issue.

from flutter_carousel_widget.

stormenergy91 avatar stormenergy91 commented on May 23, 2024

Thanks @nixrajput, is a great plugin. If you need more info or some testing I'm here!

from flutter_carousel_widget.

nixrajput avatar nixrajput commented on May 23, 2024

Hi @stormenergy91,

Can you please share some code snippets for testing the changes you want in the package?

from flutter_carousel_widget.

stormenergy91 avatar stormenergy91 commented on May 23, 2024

@nixrajput as you can see in this image, on the left there is the actual result, on the right what I want to have:

plugin_demo

Here the code that I have used:

ListView(
      children: [
        Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            
            ...

            FutureBuilder(
                future: items,
                builder: (context, AsyncSnapshot snapshot) {
                  List<CustomhView> itemsList = [];

                  if (snapshot.connectionState == ConnectionState.waiting) {
                    return Container(
                      height: 200,
                      child: Center(
                        child: CircularProgressIndicator(),
                      ),
                    );
                  } else {
                    if (snapshot.hasError) {
                      return const Text("Network Error");
                    } else {
                      if (snapshot.data.length == 0) {
                        return const Text("No Items");
                      } else {
                        for (var i = 0; i < snapshot.data.length; i++) {
                          itemsList.add(CustomView(snapshot.data[i]));
                        }

                        return FlutterCarousel(
                          items: itemsList,
                          options: CarouselOptions(
                            viewportFraction: 0.70,
                            height: 280.0,
                            showIndicator: false,
                            pageSnapping: false,
                            disableCenter: true,
                            enableInfiniteScroll: false,
                            slideIndicator: CircularSlideIndicator(),
                          ),
                        );
                      }
                    }
                  }
                }),

                ...
            
          ],
        ),
      ],
    )

The property disableCenter what is used for?

from flutter_carousel_widget.

nixrajput avatar nixrajput commented on May 23, 2024

Hi @stormenergy91,

I checked and tested the code and I found that no additional change requires in the code for this issue.

In your case, you can use padEnds property to false.

CarouselOptions(
  viewportFraction: 0.70,
  height: 280.0,
  showIndicator: false,
  padEnds: false,
  enableInfiniteScroll: false,
  slideIndicator: CircularSlideIndicator(),
),

Thanks

from flutter_carousel_widget.

stormenergy91 avatar stormenergy91 commented on May 23, 2024

Thanks so much! :)

from flutter_carousel_widget.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.