jyotsnayall / sliding_images-flutter-plugin

A Flutter widget for creating image sliders.

Home Page:https://pub.dev/packages/sliding_images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sliding_images

SlidingImages Flutter widget creates image sliders with customizable properties such as image dimensions, padding, auto-play, custom indicators, and more..

demo

Features

  • Image carousel with URL support.
  • Customizable image dimensions and padding.
  • Set the initial displayed image index.
  • Auto-play with interval.
  • Apply border to images.
  • Navigation indicator.
  • Animation curve customization.
  • Scaling for active and non-active images.

Getting started

To use this package, add sliding_images as a dependency in your pubspec.yaml file.

Usage

Minimal example:

SlidingImages(
  imgUrls: ["https://p1.pxfuel.com/preview/321/155/730/alpine-bavaria-flowers-germany.jpg",
            "https://p1.pxfuel.com/preview/818/670/574/dogs-chihuahua-rest-small-fur-cozy.jpg",
            "https://p0.pxfuel.com/preview/961/674/322/podcast-coffee-chocolate-cup.jpg",
            ],
)

Custom settings:

    SlidingImages(
      imgUrls: ["https://p1.pxfuel.com/preview/321/155/730/alpine-bavaria-flowers-germany.jpg",
                "https://p1.pxfuel.com/preview/818/670/574/dogs-chihuahua-rest-small-fur-cozy.jpg",
                "https://p0.pxfuel.com/preview/961/674/322/podcast-coffee-chocolate-cup.jpg",
                ],
      imageWidth: 300,
      imageHeight: 200,
      padding: EdgeInsets.all(8.0),
      border: Border.all(color: Colors.grey, width: 1.0),
      autoPlayInterval: Duration(seconds: 3),
      customIndicator: CustomIndicator(),
      initialPage: 2,
      enableAutoPlay: true,
      infiniteScroll: true,
      animationCurve: Curves.easeInOut,
      activeSlideScale: 1.2,
      nonActiveSlideScale: 0.9,
    )

See also

About

A Flutter widget for creating image sliders.

https://pub.dev/packages/sliding_images

License:MIT License


Languages

Language:C++ 39.5%Language:CMake 34.6%Language:Dart 12.0%Language:C 3.5%Language:Swift 3.2%Language:HTML 3.1%Language:Shell 1.9%Language:Objective-C 1.1%Language:Java 1.0%Language:Kotlin 0.2%