double _currentSliderValue = 30.0;
Slider(
min: 0,
max: 100,
value: _currentSliderValue,
onChanged: (value) {
setState(() {
_currentSliderValue = value;
});
},
),
carousel_slider: ^4.0.0
import 'package:carousel_slider/carousel_slider.dart';
List imgList = [
'https://picsum.photos/500/300?random=1',
'https://picsum.photos/500/300?random=2',
'https://picsum.photos/500/300?random=3',
'https://picsum.photos/500/300?random=4',
'https://picsum.photos/500/300?random=5',
];
CarouselSlider.builder(
itemCount: imgList.length,
itemBuilder: (context, index, realIndex) {
print(index);
return Container(
// height: 200,
child: Image.network(imgList[index]),
);
},
options: CarouselOptions(
enlargeCenterPage: true,
autoPlay: true,
),
),