carousel_pro 0.0.1 carousel_pro: ^0.0.1 copied to clipboard
A Flutter Carousel widget.
Carousel Pro #
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.1
...
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")
],
)
),
Parameters and Values #
images
All the images on this Carousel.Type: List
animationCurve
The transition animation timing curveDefault 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 durationType: Duration
Default value: 300ms.
dotSize
The base size of the dotsType: double
Default value: 8.0
dotIncreaseSize
The increase in the size of the selected dotType: double
Default value: 2.0
dotSpacing
The distance between the center of each dotType: double
Default value: 25.0
dotColor
The Color of each dotType: Color
Default value: Colors.white
dotBgColor
The background Color of the dotsType: 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 IndicatorType: double
Default value: 20.0
boxFit
How to show the images in the boxType: 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 imagesType: bool
Default value: false
radius
Border Radius of the imagesType: Radius
Default value: Radius.circular(8.0)
moveIndicatorFromBottom
Move the Indicator From the BottomType: double
Default value: 0.0
noRadiusForIndicator
Remove the radius bottom from the indicator backgroundType: bool
Default value: false
overlayShadow
Enable/Disable Image Overlay ShadowType: bool
Default value: false
overlayShadowColors
Choose the color of the overlay Shadow colorType: Color
Default value: Colors.grey[800]
overlayShadowSize
Choose the size of the Overlay Shadow, from 0.0 to 1.0Type: double
Default value: 0.5
Credits #
Developed by JLouage (Julien Louage) info@jlouage.com
Contributing #
Feel free to help!