All Projects → GeekyAnts → infinite-carousel-flutter

GeekyAnts / infinite-carousel-flutter

Licence: MIT license
Carousel in flutter. Supports infinite looping and gives control over anchor and velocity.

Programming Languages

dart
5743 projects
HTML
75241 projects

Projects that are alternatives of or similar to infinite-carousel-flutter

InfiniteCarousel
💈Infinite Carousel Collection View
Stars: ✭ 67 (+179.17%)
Mutual labels:  infinite-scroll, carousel
react-native-reanimated-carousel
🎠 React Native swiper/carousel component, fully implemented using reanimated v2, support to iOS/Android/Web. (Swiper/Carousel)
Stars: ✭ 1,461 (+5987.5%)
Mutual labels:  infinite-scroll, carousel
react-cool-virtual
😎 ♻️ A tiny React hook for rendering large datasets like a breeze.
Stars: ✭ 1,031 (+4195.83%)
Mutual labels:  infinite-scroll, carousel
react-native-carousel
React Native carousel
Stars: ✭ 35 (+45.83%)
Mutual labels:  infinite-scroll, carousel
React Native Snap Carousel
Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
Stars: ✭ 9,151 (+38029.17%)
Mutual labels:  infinite-scroll, carousel
Hibiscus.js
Native Angular directives for Bootstrap4
Stars: ✭ 115 (+379.17%)
Mutual labels:  widget, carousel
Flutter carousel slider
A flutter carousel widget, support infinite scroll, and custom child widget.
Stars: ✭ 998 (+4058.33%)
Mutual labels:  widget, infinite-scroll
Widget
A set of widgets based on jQuery&&javascript. 一套基于jquery或javascript的插件库 :轮播、标签页、滚动条、下拉框、对话框、搜索提示、城市选择(城市三级联动)、日历等
Stars: ✭ 1,579 (+6479.17%)
Mutual labels:  widget, carousel
vuejs-loadmore
A pull-down refresh and pull-up loadmore scroll component for Vue.js. Vue上拉加载下拉刷新组件
Stars: ✭ 62 (+158.33%)
Mutual labels:  infinite-scroll
LiquidEqualizerWidget
Modern 15-band equalizer for C++/Qt
Stars: ✭ 26 (+8.33%)
Mutual labels:  widget
nl.fokkezb.form
[UNMAINTAINED] Alloy TableView Form Widget
Stars: ✭ 43 (+79.17%)
Mutual labels:  widget
cryptocoins-desklet-cinnamon
Cryptocurrency Ticker (Desklet) for Cinnamon Desktop that displays the current price for thousands of cryptocurrencies, and their daily percent changes.
Stars: ✭ 18 (-25%)
Mutual labels:  widget
flutter calendar view
A Flutter package allows you to easily implement all calendar UI and calendar event functionality. 👌🔝🎉
Stars: ✭ 219 (+812.5%)
Mutual labels:  widget
fullcalendar-calendar
Web Component wrapper for FullCalendar
Stars: ✭ 21 (-12.5%)
Mutual labels:  widget
kde-plasmoid-betterinlineclock
Your usual clock widget, just way better and on a single line!
Stars: ✭ 18 (-25%)
Mutual labels:  widget
react-magic-slider-dots
React Magic Dots Component for React Slick Carousel (inspired by Instagram)
Stars: ✭ 21 (-12.5%)
Mutual labels:  carousel
js-fileexplorer
A zero dependencies, customizable, pure Javascript widget for navigating, managing, uploading, and downloading files and folders or other hierarchical object structures on any modern web browser.
Stars: ✭ 124 (+416.67%)
Mutual labels:  widget
SwiftListView
Instagram style - Collection of simple & neutral list views for Swift
Stars: ✭ 17 (-29.17%)
Mutual labels:  widget
proca
Widget to transform your website into a cutting-edge campaign in 10 min. multi-lingual, privacy first.
Stars: ✭ 29 (+20.83%)
Mutual labels:  widget
vue3-carousel
Vue 3 carousel component
Stars: ✭ 379 (+1479.17%)
Mutual labels:  carousel

Infinite Carousel

Contributor Covenant

Infinite Carousel is a flutter carousel widget that supports infinite looping and gives precise control over selected item anchor and carousel scroll velocity.

You can easily customize the placement of selected element on the viewport, and increase/decrease scroll speed.

Based on Flutter's ListWheelScrollView to create smooth scroll effects.

Features

  • Allows you to control placement of selected item on viewport (unlike pageview which always has its page in the center of viewport).
  • Gives control over velocity of scrolling.
  • Added friction effect to slow down the carousel after scrolling.
  • Supports both horizontal and vertical axis.

Usage

Add the package to pubspec.yaml

dependencies:
  infinite_carousel: ^1.0.2

After that import the package.

import 'package:infinite_carousel/infinite_carousel.dart';
InfiniteCarousel.builder(
  itemCount: 10,
  itemExtent: 120,
  center: true,
  anchor: 0.0,
  velocityFactor: 0.2,
  onIndexChanged: (index) {},
  controller: controller,
  axisDirection: Axis.horizontal,
  loop: true,
  itemBuilder: (context, itemIndex, realIndex) {
  },
)

Controller

It also supports its own scroll controller called InfiniteScrollController which has number of useful methods to programmatically control the carousel.

  • You can pass initialItem in the constructor.
  • animateToItem(index)
  • jumpToItem(index)
  • nextItem()
  • previousItem()

Attributes

Attribute Data Type Description Default Value
itemCount int Total number of items. Required
itemExtent double Size of single item in viewport. If axis is horizontal, then this corresponds to width of item, else height of the item. Required
itemBuilder Widget Function(BuildContext, int itemIndex, int realIndex) To lazily build items on the viewport. When Loop is false, ItemIndex is equal to RealIndex (i.e, index of element). When loop is true, two indexes are exposed by item builder. One is itemIndex, that is the modded item index i.e., for list of 10, position(11) = 1, and position(-1) = 9. Other is realIndex, that is the actual index, i.e. [..., -2, -1, 0, 1, 2, ...] in loop. Real Index is needed if you want to support JumpToItem by tapping on it. Required
physics ScrollPhysics Defaults to InfiniteScrollPhysics, which makes sure we always land on a particular item after scrolling. InfiniteScrollPhysics
controller ScrollController Scroll Controller for the carousel. InfiniteScrollController
onIndexChanged void Function(int) Callback that includes new selected index.
anchor double Where to place selected item on the viewport. Ranges from 0 to 1. 0.0 means selected item is aligned to start of the viewport, and 1.0 meaning selected item is aligned to end of the viewport. This property is ignored when center is set to true. 0.0
loop bool Whether to create a infinite looping list true
velocityFactor double Increase/Decrease velocity of carousel scrolling to this factor. 0.2
axisDirection Axis Axis direction of carousel. Axis.horizontal
center bool Align selected item to center of the viewport. When this is true, anchor property is ignored. true

Flutter web

Earlier, flutter allowed scrolling the widgets by dragging using the mouse. Now, by default, it allows scrolling widgets to be dragged by all PointerDeviceKinds except for PointerDeviceKind.mouse.

If you want to support scrolling by drag, please pass the explicit ScrollBehavior to InfiniteCarousel.

scrollBehavior: ScrollConfiguration.of(context).copyWith(
  dragDevices: {
    // Allows to swipe in web browsers
    PointerDeviceKind.touch,
    PointerDeviceKind.mouse
  },
),

Reference: https://docs.flutter.dev/release/breaking-changes/default-scroll-behavior-drag

Contributing

Contributions of all kinds are welcome. Please read the guidelines and Code of Conduct before contributing.

Images used in the gifs belong to their original authors and the links can be found in example project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].