GithubHelp home page GithubHelp logo

Comments (4)

nixrajput avatar nixrajput commented on May 27, 2024 1

Hi @aisivan36 ,
Bug has been fixed and now you can update and use the latest version (1.0.5) of the flutter_carousel_widget.

I have tested the latest version of the package and it's working fine on my side.

I hope this update should resolve your issue.

Thanks.
@nixrajput

from flutter_carousel_widget.

nixrajput avatar nixrajput commented on May 27, 2024

Hi @aisivan36
I'd be happy to resolve and fix your issue related to the package.

Can you share your code snippet and full error description.
Also mention which version you're using?

Thanks

from flutter_carousel_widget.

aisivan36 avatar aisivan36 commented on May 27, 2024

Hi @aisivan36 I'd be happy to resolve and fix your issue related to the package.

Can you share your code snippet and full error description. Also mention which version you're using?

Thanks

Here is the whole widget that I use

Widget build(BuildContext context) {
     final heights = MediaQuery.of(context).size.height * 0.56;
     final widths = MediaQuery.of(context).size.width;
     final positionHeight = MediaQuery.of(context).size.height * 0.4;
     return SizedBox(
       height: heights,
       child: Stack(
         children: [
           /// Background blur image on every each
           CachedNetworkImage(
             imageUrl: widget.movies[current].backdrop,
             fit: BoxFit.cover,
             height: heights,
           ),
           Positioned(
            child: ClipRRect(
              child: BackdropFilter(
                filter: ImageFilter.blur(sigmaX: 50, sigmaY: 100),
                child: Container(
                  height: heights,
                  width: widths,
                  color: const Color.fromARGB(61, 0, 0, 0),
                  // color: Colors.black.withOpacity(0.5),
                  alignment: Alignment.topCenter,
                  child: SafeArea(
                    /// MovieDB title
                    child: Container(
                      child: Padding(
                        padding: const EdgeInsets.only(
                            left: 50, right: 50, top: 9, bottom: 9),
                        child: Padding(
                          padding: const EdgeInsets.only(top: 1.0, bottom: 1.0),
                          child: Text(
                            'MovieDB',
                            style: heading.copyWith(
                              color: Theme.of(context).primaryColor,
                            ),
                          ),
                        ),
                      ),
                      decoration: const BoxDecoration(
                        borderRadius: BorderRadius.only(
                            bottomLeft: Radius.circular(13),
                            bottomRight: Radius.circular(13)),
                        color: Color.fromARGB(134, 20, 199, 44),
                        // border: Border(
                        //   bottom: BorderSide(
                        //     color: Colors.grey,
                        //     width: 0.6,
                        //   ),
                        // ),
                      ),
                    ),
                    //
                  ),
                ),
              ),
            ),
          ),
          Positioned(
            bottom: 0,
            left: 0,
            right: 0,
            top: 0,
            child: Container(
              height: positionHeight,
              decoration: BoxDecoration(
                gradient: LinearGradient(
                  begin: Alignment.bottomCenter,
                  end: Alignment.topCenter,
                  colors: [
                    Colors.black38.withOpacity(1),
                    Colors.black38.withOpacity(1),
                    Colors.black38.withOpacity(.7),
                    Colors.black38.withOpacity(.6),
                    Colors.black38.withOpacity(.4),
                    Colors.black38.withOpacity(.3),
                    Colors.black38.withOpacity(0.5),
                    Colors.black38.withOpacity(0.3),
                    Colors.black38.withOpacity(0.0),
                    Colors.black38.withOpacity(0.0),
                  ],
                ),
              ),
            ),
          ),
          Positioned(
            bottom: 0,
            height: positionHeight,
            width: widths,
            child: DelayedDisplay(
              delay: const Duration(microseconds: 800),
              child: SizedBox(
                height: 350,
                width: 460,
                child: CarouselSlider(
                  options: CarouselOptions(
                    // pageSnapping: true,
                    // disableCenter: true,
                    height: positionHeight,
                    aspectRatio: 16 / 9,
                    viewportFraction: 0.85,
                    enlargeCenterPage: true,
                    enlargeStrategy: CenterPageEnlargeStrategy.height,
                    onPageChanged: (index, reason) {
                      setState(() {
                        current = index;
                      });
                    },
                  ),
                  carouselController: carouselController,
                  items: widget.movies.map((movie) {
                    return Builder(
                      builder: (BuildContext context) {
                        return InkWell(
                          onTap: () {
                            pushNewScreen(
                                context,
                                MovieDetailScreen(
                                  backdrop: movie.backdrop,
                                  id: movie.id,
                                ));
                          },
                          child: Padding(
                            padding: const EdgeInsets.all(12.0),
                            child: Column(
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: [
                                Container(
                                  clipBehavior: Clip.hardEdge,
                                  decoration: BoxDecoration(
                                    boxShadow: kElevationToShadow[8],
                                    borderRadius: BorderRadius.circular(10),
                                  ),
                                  child: DelayedDisplay(
                                    delay: const Duration(microseconds: 800),
                                    slidingBeginOffset:
                                        const Offset(0.0, -0.01),
                                    child: ClipRRect(
                                      borderRadius: BorderRadius.circular(10),
                                      child: CachedNetworkImage(
                                          imageUrl: movie.backdrop,
                                          width: double.infinity,
                                          height: (MediaQuery.of(context)
                                                      .size
                                                      .height *
                                                  .38) *
                                              .6,
                                          progressIndicatorBuilder: (context,
                                                  url, downloadProgress) =>
                                              Container(
                                                color: Colors.grey.shade900,
                                              ),
                                          fit: BoxFit.cover),
                                    ),
                                  ),
                                ),
                                const SizedBox(height: 20),
                                if (current == widget.movies.indexOf(movie))
                                  DelayedDisplay(
                                    delay: const Duration(microseconds: 800),
                                    slidingBeginOffset:
                                        const Offset(0.0, -0.10),
                                    child: Text(
                                      movie.title,
                                      maxLines: 2,
                                      textAlign: TextAlign.center,
                                      style: const TextStyle(
                                          overflow: TextOverflow.ellipsis,
                                          fontSize: 18.0,
                                          color: Colors.white,
                                          fontWeight: FontWeight.bold),
                                    ),
                                  ),
                                const SizedBox(height: 6),
                                if (current == widget.movies.indexOf(movie))
                                  Expanded(
                                    flex: 1,
                                    child: DelayedDisplay(
                                      delay: const Duration(microseconds: 900),
                                      slidingBeginOffset:
                                          const Offset(0.0, -0.10),
                                      child: Text(
                                        movie.releaseDate,
                                        style: normalText.copyWith(
                                            color: Colors.white60,
                                            fontSize: 16),
                                      ),
                                    ),
                                  ),
                              ],
                            ),
                          ),
                        );
                      },
                    );
                  }).toList(),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }

from flutter_carousel_widget.

aisivan36 avatar aisivan36 commented on May 27, 2024

That was I use Carousel Slider, but it's the same happened with your custom flutter carousel widget actually no difference, got the same error when enabling enlargeCenterPage: true it caused the error message that given above

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.