Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touchable swipe not working #5

Open
mamonraab opened this issue Jun 22, 2021 · 5 comments
Open

touchable swipe not working #5

mamonraab opened this issue Jun 22, 2021 · 5 comments

Comments

@mamonraab
Copy link

mamonraab commented Jun 22, 2021

hello , iam using flutter_card_swipper:^0.4.0

swiper when try to swipe using fingers or mouse not working just the control or pages click is work
here is my swiper code

`
Container( color: Colors.white60,
height: MediaQuery.of(context).size.height * 0.3,
child:Swiper(itemCount: _sliddata.length,
control: new SwiperControl(
color: Colors.red
),
autoplay: true,
itemBuilder: (context, index) {
return imgbuildr(index);
},
pagination: new SwiperPagination(
margin: new EdgeInsets.all(5.0),
builder: new DotSwiperPaginationBuilder(
color: Colors.grey, activeColor: Colors.red)

     ),

     loop: true,
     scrollDirection: Axis.horizontal,
     viewportFraction: 0.1,

     scale: 2,
     itemHeight: MediaQuery.of(context).size.height * 0.3,
     itemWidth: MediaQuery.of(context).size.width * 0.85 ,
     autoplayDelay: 9250,
      duration: 622,

     layout:
     SwiperLayout.CUSTOM,
     customLayoutOption: new CustomLayoutOption(
         startIndex: -1,
         stateCount: 3,

     ).addOpacity([
       0.6,
       0.6,
       1.0


     ])


         .addRotate([

       0.03,
       0.03,
       0.0

     ])



     .addScale([
       0.8,
       0.8,
       0.96

     ],Alignment.center )

         .addTranslate([
       //offset(left,upp)
       new Offset(-100.0, 5.0),
       new Offset(100 , 5.0 ),
       new Offset(0.0, 0.0)
     ]),
   ) ,
 )

`

@xarmatura
Copy link

The same problem @pzentenoe, please how to fix it

@xarmatura
Copy link

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _CastError was thrown building AnimatedBuilder(animation:
I/flutter: TransformerPageController#8e667(one client, offset 0.0), dirty, state: _AnimatedState#4ada8):
I/flutter: Null check operator used on a null value
I/flutter: The relevant error-causing widget was:
I/flutter: Swiper
When the exception was thrown, this was the stack:
#0 new Swiper.list. (package:flutter_card_swipper/src/swiper.dart:282:25)
I/flutter: #1 _TransformerPageViewState._buildItem. I/flutter: #2 AnimatedBuilder.build (package:flutter/src/widgets/transitions.dart:1468:19)
I/flutter: #3 _AnimatedState.build (package:flutter/src/widgets/transitions.dart:174:48)

@xarmatura
Copy link

xarmatura commented Jul 5, 2021

@mamonraab Mate, you should use the card_swiper plugin, It is forked with null safety from flutter_swiper. Same things, but works.

@mamonraab
Copy link
Author

thanks bro i end up doing my own slider , but i will give card_swiper a try

@pzentenoe
Copy link
Owner

I'm sorry guys I've been too busy in my work I haven't been able to evolve this package, for now I see it difficult, can you send me a pull request, I'll be happy to review it.
Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants