GithubHelp home page GithubHelp logo

loisgenesis / flutter-carousel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geekyants/flutter-carousel

1.0 0.0 0.0 116.1 MB

A carousel package in flutter with various configuration options

License: Other

Java 2.25% Dart 94.56% Objective-C 1.84% Shell 1.36%

flutter-carousel's Introduction

Flutter_Carosel

A simple Carousel Widget with multiple configuration option.

...
dependencies:
 ...
 flutter_multi_carousel: ^1.0.0
...

And install it using flutter packages get on your project folder. After that, just import the module and use it:

import 'package:flutter/material.dart';
import 'package:flutter_multi_carousel/carousel.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Carousel Demo',
      home: CarouselExample(),
    );
  }
}

class CarouselExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Carousel(
            height: 350.0,
            width: 350,
            initialPage: 3,
            allowWrap: false,
            type: Types.slideSwiper,
            onCarouselTap: (i) {
              print("onTap $i");
            },
            indicatorType: IndicatorTypes.bar,
            arrowColor: Colors.black,
            axis: Axis.horizontal,
            showArrow: true,
            children: List.generate(
                7,
                (i) => Center(
                      child:
                          Container(color: Colors.red.withOpacity((i + 1) / 7)),
                    ))),
      ),
    );
  }
}

For detailed demonstration refer this GitHub link

https://github.com/jaiswalshubham84/Flutter-Carousel

Getting Startedslide

Properties Type Default Value Description
height Double null Defines height of carousel.This field is required
width Double null Defines width of carousel. This field is required
axis Axis Axis.horizontal Defines axis of carousel.
type Types "simple" Defines type of carousel.
for ex: Types.simple, Types.slideSwiper, Types.xRotating, Types.yRotating, Types.zRotating, Types.multiRotating
onCarouselTap Function null A callback function
arrowColor Color Colors.white Define the color of arrow
arrowColor Color Colors.white Define the color of arrow
showIndicator Bool true Choice to show indicator in carousel
indicatorType IndicatorTypes bar Defines the type of indicator.
For ex: IndicatorTypes.bar, IndicatorTypes.dot, IndicatorTypes.bubble
initialPage int 0 Start your carousel with custom initial page number
activeIndicatorColor Color Colors.white Defines the color of active indicator
unActiveIndicatorColor Color Colors.black Defines the color of unactive indicator
indicatorBackgroundColor Color Color(0xff121212) Defines the background color of indicator
indicatorBackgroundOpacity Double 0.5 Defines the opacity of indicator background
allowWrap bool true Defines if the carousel should wrap once you reach the end or if your at the begining and go left if it should take you to the end


Credits

Developed by Shubham Jaiswal [email protected]

Contributing

Feel free to Contribute!

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

flutter-carousel's People

Contributors

jaiswalshubham84 avatar jrice3rt avatar loisgenesis avatar

Stargazers

 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.