Giter Club home page Giter Club logo

wonderful_images_carousel's Introduction

wonderful images carousel

a wonderful images carousel for flutter

screenshot

Features

  • Display images in a carousel
  • cache images
  • auto play
  • custom indicator size & colors
  • custom indicator position
  • custom carousel size
  • custom carousel radius
  • custom carousel margin
  • custom carousel background color

Getting started

1. Add dependency to your pubspec.yaml

dependencies:
  wonderful_images_carousel: ^0.0.1

2. Import package in dart file

import 'package:wonderful_images_carousel/wonderful_images_carousel.dart';

3. Use the widget

 final List<String> images = [
    "https://picsum.photos/id/45/1080/1920",
    "https://picsum.photos/id/237/1080/1920",
    "https://picsum.photos/id/74/1080/1920",
  ];


    @override
    Widget build(BuildContext context) {
        return Scaffold(
            appBar: AppBar(
            title: Text(widget.title),
            ),
            body: WonderfulImagesCarousel(
            images: images,
            ),
        );
        }

custom indicator size & colors

    @override
    Widget build(BuildContext context) {
        return Scaffold(
            appBar: AppBar(
            title: Text(widget.title),
            ),
            body: WonderfulImagesCarousel(
            images: images,
            indicatorSize: 10,
            indicatorActiveColor: Colors.red,
            indicatorInactiveColor: Colors.blue,
            ),
        );
        }

properties

property description default
images list of images url required
height height of the carousel 200
width width of the carousel width of the screen
borderRadius border radius of the carousel 10
backgroundColor background color of the carousel grey[300]
indicatorColor color of the indicator primary color of the app
unselectedIndicatorColor color of the unselected indicator grey[300]
indicatorSize size of the indicator 15
unSelectedIndicatorSize size of the unselected indicator 10
indicatorSpacing spacing between the indicators 4
autoSlide enable auto slide true
autoSlideDuration duration of the auto slide 6 seconds
slideDuration duration of the slide 300 milliseconds
slideCurve curve of the slide Curves.easeIn
loadingIndicatorWidget widget to show while loading the image from the network CircularProgressIndicator()
onErrorWidget is the widget to show if there is an error while loading the image from the network error icon with a red color
edgeMargin margin of the container 16
indicatorPositioned positioned of the indicator bottom: 20 , right: 20

wonderful_images_carousel's People

Contributors

itsdarksama avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.