Skip to content

InnoFlutter/carousel_3d

Repository files navigation

3D carousel

The package provides a widget that displays user data as 3 dimensional carousel

Getting started

  1. Add package to pubspec.yaml carousel_widget_3d: 1.0.0

  2. Import it to file where it is going to be used

  3. Create Carousel3d widget and provide required attributes

Carousel3d(
          center: _center,
          items: [
          <items to display>
          ],
        )

Where center is a state that controls which element is central in carousel. By changing center the carousel is rotated so that any event can be associated with carousel rotation

Usage

Display 5 different images in carousel

Carousel3d(
          center: _center,
          items: [
            Image.assets('assets/img_1.png'),
                      Image.asset('assets/img_2.png'),
                      Image.asset('assets/img_3.png'),
                      Image.asset('assets/img_4.png'),
                      Image.asset('assets/img_5.png'),
          ],
        )

Result

Additional information

Parameters:
center - index of the current central element
items - widgets to display in carousel
duration - duration of carousel animations
displayRadius - how much items displayed on each side from central item

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages