Skip to content

Instantly share code, notes, and snippets.

@iabhishek07
Created August 14, 2020 06:02
Show Gist options
  • Save iabhishek07/54757e692f1f541b69bfe492d16bc49e to your computer and use it in GitHub Desktop.
Save iabhishek07/54757e692f1f541b69bfe492d16bc49e to your computer and use it in GitHub Desktop.
Container(
height: 550,
padding: EdgeInsets.only(left: 32.0),
child: Swiper(
// autoplay: true,
itemCount: characters.length,
itemWidth: MediaQuery.of(context).size.width - 2 * 64,
layout: SwiperLayout.STACK,
pagination: SwiperPagination(
builder: DotSwiperPaginationBuilder(
activeSize: 15.0,
color: Colors.white24,
activeColor: Colors.white,
),
),
itemBuilder: (context, index) {
return InkWell(
onTap: () {
Navigator.push(
context,
PageRouteBuilder(
pageBuilder: (context, a, b) => DetailPage(
charInfo: characters[index],
),
),
);
},
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment