Skip to content

CUSTOM Layout tap on card, receive slide event and move #37

@pjcau

Description

@pjcau

HI Guys,

that's great library. When I use a custom layout and autoplay = true, if I touch on slide, and stay some seconds, receive the event and go to the next with the finger on same card. That's not good. But in Defaut layout not slide if I touch in on card.

new Swiper(
onTap: (int index) {
final item = dataModel.elementAt(index);
goToSection(context, item.section);
},
autoplay: true,
autoplayDisableOnInteraction:true,
itemCount: 3,
itemHeight: screenHeight * 0.9,
itemWidth: screenWidght * 0.9,
layout: SwiperLayout.CUSTOM,
customLayoutOption: new CustomLayoutOption(
startIndex: 0,
stateCount: 3,
).addRotate([-45.0 / 180, 0.0, 45.0 / 180]).addTranslate([
new Offset(-screenWidght * 0.9, -40.0),
new Offset(0.0, 0.0),
new Offset(screenWidght * 0.9, -40.0)
]),
itemBuilder: (BuildContext context, int index) {
final item = dataModel.elementAt(index);
return getContainerItemCarousel(context,
item);
},
),

BR

J

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions