traversal_slider 1.0.2 copy "traversal_slider: ^1.0.2" to clipboard
traversal_slider: ^1.0.2 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.2

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 #

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(() {});
   },
  ),

me

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(() {});
   },
  ),

me

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
160
points
36
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)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on traversal_slider