carousel_page_view 1.0.2 copy "carousel_page_view: ^1.0.2" to clipboard
carousel_page_view: ^1.0.2 copied to clipboard

Carousel with 3D style stack transition

Carousel Plus page view flutter #

pub.dev

Features #

Create 3D style carousel with page view. The widget moves in Z-axis and rotates in X-axis. Giving it a 3D effect.

Getting started #

add dependency to your pubspec.yaml file


dependencies:
  carousel_page_view: ^1.0.2

import package in your dart file


import 'package:carousel_page_view/carousel_plus.dart';

Usage #

Add CarouselPlus to your widget and pass the list of children that you want to display.


import 'package:carousal_test/generated/assets.dart';
import 'package:carousel_page_view/carousel_plus.dart';
import 'package:flutter/material.dart';

const carouselImages = [
  Assets.sqImages1,
  Assets.sqImages2,
  Assets.sqImages3,
  Assets.sqImages4,
];

class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      body: Center(
        child: SizedBox(
          width: MediaQuery.of(context).size.width,
          height: 180,
          child: CarouselPlus(
            childSize: 100,
            onCenterItemPressed: (index) {
              print('Center item pressed: $index');
            },
            children: List.generate(carouselImages.length, (index) {
              return Image.asset(
                carouselImages[index],
                fit: BoxFit.cover,
              );
            }),
          ),
        ),
      ),
    );
  }
}

Future roadmap #

  • Add more configuration option like rotation, scaling, etc.
8
likes
130
points
36
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

Carousel with 3D style stack transition

Repository (GitHub)
View/report issues

Topics

#animation #list #stacked #pageview #listview

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

equatable, flutter, flutter_bloc

More

Packages that depend on carousel_page_view