Fully functional slick slider implimentation for the flutter app
Roadmap
-
SlickView with fix width
-
Infinite slickview
Installation 💻
❗ In order to start using Slick you must have the Flutter SDK installed on your machine.
Add slick
to your pubspec.yaml
:
dependencies:
slick:
Install it:
flutter packages get
Import package:
import 'package:slick/slick.dart';
integration
Initialize the controller:
SlickController slickController = SlickController();
Wrap Widget
with RippleAnimation
and assign needed parameter.
SizedBox(
height: 45,
child: SlickView.builder(
slickController: slickController,
itemCount: newsType.length,
itemBuilder: (context, index) {
return Center(
child: Container(
height: 30,
padding: const EdgeInsets.symmetric(
horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: index == 0
? Colors.black
: Colors.grey.withOpacity(0.15),
borderRadius: BorderRadius.circular(6)),
child: Center(
child: Text(
newsType[index],
style: TextStyle(
color: index == 0 ? Colors.white : Colors.black),
)),
),
);
},
),
),
controll
Slide to previous item:
slickController.previous();
slide to next item:
slickController.next();
Features
This package support following parameter and methods.
Parameter
SlickView
widget provide follwoing parameter to config your slick slider effect.
Parameter defined for SlickView
widget:
Name | Type | Description |
---|---|---|
slickController | SlickController | Provide controller to controll your slider. |
itemCount | int | Number of item in the slider. |
previousWidget | Widget | Widget for the previous button. |
showPrevious | bool | if provide false then it will hide previous button, Default is true |
nextWidget | Widget | Widget for the next button. |
showNext | bool | if provide false then it will hide next button, Default is true |
itemSpace | double | Space between two item |
actionSpace | double | Space between main item and action button |
Preview
Screenshot
TODO: Here is the few screenshot for the preview. This will be remove in new verison becuase pub.dev now support screenshot.
![]() Desktop |
![]() Web |
Main Contributors
Jemis Goti |
Authors
Thanks
Thank you for using this package and keep supporting opensource community.