carousel_images 1.0.1 carousel_images: ^1.0.1 copied to clipboard
Carousel of images with reality effect
import 'package:flutter/material.dart';
import 'package:carousel_images/carousel_images.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget{
final List<String> listImages = [
'assets/1.jpg',
'https://www.factroom.ru/wp-content/uploads/2019/04/5-osobennostej-klimata-pitera-o-kotoryh-vy-dolzhny-znat-esli-sobiraetes-syuda-priekhat.jpg',
'https://cdn.flixbus.de/2018-01/munich-header-d8_0.jpg',
'assets/4.jpg',
'assets/5.jpg',
];
@override
Widget build(BuildContext context) {
return Material(
color: Colors.white,
child: Column(
children: <Widget>[
SizedBox(height: 100),
CarouselImages(
listImages: listImages,
height: 300.0,
onTap: (index){
print('Tapped on page $index');
},
)
],
),
);
}
}