vertical_card_pager 1.1.1
vertical_card_pager: ^1.1.1 copied to clipboard
Use dynamic and beautiful card view pagers to help you create great apps.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:vertical_card_pager/vertical_card_pager.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
final List<String> titles = [
"RED",
"YELLOW",
"BLACK",
"CYAN",
"BLUE",
"GREY",
];
final List<Widget> images = [
Container(
color: Colors.red,
),
Container(
color: Colors.yellow,
),
Container(
color: Colors.black,
),
Container(
color: Colors.cyan,
),
Container(
color: Colors.blue,
),
Container(
color: Colors.grey,
),
];
return Scaffold(
body: SafeArea(
child: Column(
children: <Widget>[
Expanded(
child: Container(
child: VerticalCardPager(
textStyle: TextStyle(
color: Colors.white, fontWeight: FontWeight.bold),
titles: titles,
images: images,
onPageChanged: (page) {
// print(page);
},
onSelectedItem: (index) {},
),
),
),
],
),
),
);
}
}