vertical beautiful card pager
use dynamic and beautiful card view pagers to help you create great apps.
preview
new feature
v1.3.0
- change alignment
left | center(default) | right |
---|---|---|
v1.4.0
- enable web
installing
- add dependency to
pubspec.yaml
get the latest version in the ‘installing’ tab on pub.dartlang.org
dependencies:
vertical_card_pager: ^1.5.0
- import the package
import 'package:vertical_card_pager/vertical_card_pager.dart';
- adding
verticalcardpager
with optional parameters
@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(
titles: titles, // required
images: images, // required
textstyle: textstyle(color: colors.white, fontweight: fontweight.bold), // optional
onpagechanged: (page) { // optional
},
onselecteditem: (index) { // optional
},
initialpage: 0, // optional
align : align.center // optional
),
),
),
],
),
),
);
}
Comments are closed.