image_slider_button 0.0.2 image_slider_button: ^0.0.2 copied to clipboard
A slider with a image.
Image Slider #
A Slider with images.
Use this package as a library
- Depend on it Add this to your package's pubspec.yaml file:
dependencies:
image_slider_button: ^0.0.1
- Install it You can install packages from the command line:
with pub:
$ pub get
with Flutter:
$ flutter pub get
Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.
- Import it Now in your Dart code, you can use:
import 'package:image_slider_button/image_slider.dart';
import 'package:image_slider_button/image_slider_painter.dart';
Create a Image Slider:
Create a Image Slider with an array of Images.
ImageSlider(
images: [
AssetImage('assets/images/bra.png'),
AssetImage('assets/images/jpn.png'),
AssetImage('assets/images/can.png'),
],
),
Callbacks:
ImageSlider(
images: [
AssetImage('assets/images/bra.png'),
AssetImage('assets/images/jpn.png'),
AssetImage('assets/images/can.png'),
],
onStart: () {
// DO STUFF
},
onUpdate: (percentage) {
// DO STUFF
print(percentage);
},
onEnd: (position) {
// DO STUFF
print(pos);
},
),
<<<<<<< HEAD #
bdabe21aab3957b1cd25a55296502683ff8dccaa