traversal_slider 1.0.0 copy "traversal_slider: ^1.0.0" to clipboard
traversal_slider: ^1.0.0 copied to clipboard

The traversal_slider package is a Flutter widget that allows for the smooth and animated traversal of widgets in a circular rotation.

traversal_slider #

The traversal_slider package is a Flutter widget that allows for the smooth and animated traversal of widgets in a circular rotation.

Usage #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  traversal_slider: ^1.0.0

In your library add the following import:

import 'package:traversal_slider/traversal_slider.dart';

For help getting started with Flutter, view the online documentation.

Example #

Single View Slider implementation

TraversalSliderWidget(
   widgets: List.generate(
       foodImages.length,
       (index) => Image.asset(
          foodImages[index],
          fit: BoxFit.cover,
        ),
      ),
   sliderType: SliderType.singleViewSlider,
   onIndexChanged: (value) {
     currentIndex = value;
     setState(() {});
   },
  ),
[singleViewSlider.gif?raw=true]

Multiple View Slider implementation

TraversalSliderWidget(
   widgets: List.generate(
       foodImages.length,
       (index) => Image.asset(
          foodImages[index],
          fit: BoxFit.cover,
        ),
      ),
   sliderType: SliderType.multipleViewSlider,
   onIndexChanged: (value) {
     currentIndex = value;
     setState(() {});
   },
  ),
[multipleViewSlider.gif?raw=true]

Options #

Name Description Default Return
widgets For assign widgets list [] -
sliderType For Different Slider Types SliderType.singleViewSlider -
onIndexChange Trigger when widget animate/change 0 current widget index
9
likes
0
points
11
downloads

Publisher

unverified uploader

Weekly Downloads

The traversal_slider package is a Flutter widget that allows for the smooth and animated traversal of widgets in a circular rotation.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on traversal_slider