carousel_pro 0.0.13

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 91

Carousel Pro pub package

A Flutter Carousel widget.

Usage

As simple as using any flutter Widget.

Example: Add the module to your project pubspec.yaml:

...
dependencies:
 ...
 carousel_pro: ^0.0.13
...

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

import 'package:carousel_pro/carousel_pro.dart';

//...
new SizedBox(
  height: 150.0,
  width: 300.0,
  child: new Carousel(
    images: [
      new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*GqdzzfB_BHorv7V2NV7Jgg.jpeg'),
      new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*wnIEgP1gNMrK5gZU7QS0-A.jpeg'),
      new ExactAssetImage("assets/images/LaunchImage.jpg")
    ],
  )
),

ScreenShot 01

import 'package:carousel_pro/carousel_pro.dart';

//...
new SizedBox(
  height: 200.0,
  width: 350.0,
  child: new Carousel(
    images: [
      new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*GqdzzfB_BHorv7V2NV7Jgg.jpeg'),
      new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*wnIEgP1gNMrK5gZU7QS0-A.jpeg'),
      new ExactAssetImage("assets/images/LaunchImage.jpg")
    ],
    dotSize: 4.0,
    dotSpacing: 15.0,
    dotColor: Colors.lightGreenAccent,
    indicatorBgPadding: 5.0,
    dotBgColor: Colors.purple.withOpacity(0.5),
    borderRadius: true,
  )
),

ScreenShot 02

import 'package:carousel_pro/carousel_pro.dart';

//...
new SizedBox(
    height: 200.0,
    width: 350.0,
    child: new Carousel(
      images: [
        new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*GqdzzfB_BHorv7V2NV7Jgg.jpeg'),
        new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*wnIEgP1gNMrK5gZU7QS0-A.jpeg'),
        new ExactAssetImage("assets/images/LaunchImage.jpg")
      ],
      dotSize: 4.0,
      dotSpacing: 15.0,
      dotColor: Colors.lightGreenAccent,
      indicatorBgPadding: 5.0,
      dotBgColor: Colors.purple.withOpacity(0.5),
      borderRadius: true,
      moveIndicatorFromBottom: 180.0,
      noRadiusForIndicator: true,
    )
),

ScreenShot 03

import 'package:carousel_pro/carousel_pro.dart';

//...
new SizedBox(
    height: 200.0,
    width: 350.0,
    child: new Carousel(
      images: [
        new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*GqdzzfB_BHorv7V2NV7Jgg.jpeg'),
        new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*wnIEgP1gNMrK5gZU7QS0-A.jpeg'),
        new ExactAssetImage("assets/images/LaunchImage.jpg")
      ],
      dotSize: 4.0,
      dotSpacing: 15.0,
      dotColor: Colors.lightGreenAccent,
      indicatorBgPadding: 5.0,
      dotBgColor: Colors.purple.withOpacity(0.5),
      borderRadius: false,
      moveIndicatorFromBottom: 180.0,
      noRadiusForIndicator: true,
      overlayShadow: true,
      overlayShadowColors: Colors.white,
      overlayShadowSize: 0.7,
    )
),

ScreenShot 04

import 'package:carousel_pro/carousel_pro.dart';

//...
new SizedBox(
    height: 200.0,
    width: 350.0,
    child: new Carousel(
      images: [
        new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*GqdzzfB_BHorv7V2NV7Jgg.jpeg'),
        new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*wnIEgP1gNMrK5gZU7QS0-A.jpeg'),
        new ExactAssetImage("assets/images/LaunchImage.jpg")
      ],
      showIndicator: false,
      borderRadius: false,
      moveIndicatorFromBottom: 180.0,
      noRadiusForIndicator: true,
      overlayShadow: true,
      overlayShadowColors: Colors.white,
      overlayShadowSize: 0.7,
    )
),

ScreenShot 05

Parameters and Values

images

All the images on this Carousel. Type: List

animationCurve

The transition animation timing curve Default value: Curves.ease Type: Curve

Values
  • Curves.linear;
  • Curves.fastOutSlowIn;
  • Curves.ease;
  • Curves.bounceOut;
  • Curves.bounceIn;
  • Curves.bounceInOut;
  • Curves.decelerate;
  • Curves.ease;
  • Curves.easeIn;
  • Curves.easeInOut;
  • Curves.easeOut;
  • Curves.elasticIn;
  • Curves.elasticInOut;
  • Curves.elasticOut;

animationDuration

The transition animation duration Type: Duration Default value: 300ms.

dotSize

The base size of the dots Type: double Default value: 8.0

dotIncreaseSize

The increase in the size of the selected dot Type: double Default value: 2.0

dotSpacing

The distance between the center of each dot Type: double Default value: 25.0

dotColor

The Color of each dot Type: Color Default value: Colors.white

dotBgColor

The background Color of the dots Type: Color Default value: Colors.grey[800].withOpacity(0.5)

showIndicator

Enable or Disable the indicator (dots) Type: bool Default value: true

indicatorBgPadding

Padding Size of the background Indicator Type: double Default value: 20.0

boxFit

How to show the images in the box Type: BoxFit Default value: cover

Values
  • BoxFit.cover;
  • BoxFit.fitWidth;
  • BoxFit.fitHeight;
  • BoxFit.scaleDown;
  • BoxFit.fill;
  • BoxFit.contain;
  • BoxFit.none;

borderRadius

Enable/Disable radius Border for the images Type: bool Default value: false

radius

Border Radius of the images Type: Radius Default value: Radius.circular(8.0)

moveIndicatorFromBottom

Move the Indicator From the Bottom Type: double Default value: 0.0

noRadiusForIndicator

Remove the radius bottom from the indicator background Type: bool Default value: false

overlayShadow

Enable/Disable Image Overlay Shadow Type: bool Default value: false

overlayShadowColors

Choose the color of the overlay Shadow color Type: Color Default value: Colors.grey[800]

overlayShadowSize

Choose the size of the Overlay Shadow, from 0.0 to 1.0 Type: double Default value: 0.5

autoplay

Enable/Disable autoplay carousel Type: bool Default value: true

autoplayDuration

The autoplay transition duration Type: Duration Default value: 3s

Credits

Developed by JLouage (Julien Louage) info@jlouage.com

Contributing

Feel free to help!

[0.0.12]

  • Animation added

[0.0.11]

  • Screenshot added
  • Example added
  • Readme Modified

[0.0.1]

  • Initial Release

example/main.dart

import 'package:flutter/material.dart';
import 'package:carousel_pro/carousel_pro.dart';

void main() {
  runApp(
      new MaterialApp(
          debugShowCheckedModeBanner: true,
          title: 'Carousel Pro',
          home: new CarouselPage(),
      )
  );
}

class CarouselPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      body: new Center(
        child: new SizedBox(
            height: 150.0,
            width: 300.0,
            child: new Carousel(
              images: [
                new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*GqdzzfB_BHorv7V2NV7Jgg.jpeg'),
                new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*wnIEgP1gNMrK5gZU7QS0-A.jpeg'),
                new ExactAssetImage("assets/images/LaunchImage.jpg")
              ],
            )
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  carousel_pro: ^0.0.13

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:carousel_pro/carousel_pro.dart';
  
Version Uploaded Documentation Archive
0.0.13 Jun 26, 2018 Go to the documentation of carousel_pro 0.0.13 Download carousel_pro 0.0.13 archive
0.0.12 May 29, 2018 Go to the documentation of carousel_pro 0.0.12 Download carousel_pro 0.0.12 archive
0.0.11 May 25, 2018 Go to the documentation of carousel_pro 0.0.11 Download carousel_pro 0.0.11 archive
0.0.1 May 24, 2018 Go to the documentation of carousel_pro 0.0.1 Download carousel_pro 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
95
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
91
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4
  • Flutter: 0.9.5

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/src/carousel_pro.dart.

Run flutter format to format lib/src/carousel_pro.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test