Last updated:
0 purchases
mj image slider
MJ Image Slider #
Supported platforms #
Flutter Android
Flutter iOS
Flutter web
Flutter desktop
Installation #
Add mj_image_slider: to your pubspec.yaml dependencies. And import it:
import 'package:mj_image_slider/MJOptions.dart';
import 'package:mj_image_slider/mj_image_slider.dart';
copied to clipboard
How to use #
Simply create a MJImageSLider widget, and pass the required params:
List<String> images = [
"assets/images/images_1.jpg",
"assets/images/images_2.jpg",
"assets/images/images_3.jpg",
"assets/images/images_4.jpg",
];
MJImageSlider(
options: MjOptions(height: 200.0,wifth:400),
widgets: [...images.map((e) => Image(image: AssetImage(e))).toList()],
)
copied to clipboard
Params #
MJImageSlider(
options: MjOptions(
height: 200,
width:400
aspectRatio: 16/9,
viewportFraction: 0.8,
initialPage: 0,
enableInfiniteScroll: true,
autoPlayInterval: Duration(seconds: 3),
autoPlayAnimationDuration: Duration(milliseconds: 800),
autoPlayCurve: Curves.fastOutSlowIn,
onPageChanged: callbackFunction,
scrollDirection: Axis.horizontal,
),
widgets:widgets,
)
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.