serenader2014 / flutter_carousel_slider

A flutter carousel widget, support infinite scroll, and custom child widget.
https://pub.dev/packages/carousel_slider
MIT License
1.55k stars 517 forks source link

No named parameter with the name 'padEnds', while running flutter start #389

Open suraj740 opened 1 year ago

suraj740 commented 1 year ago

Hi, i am using this package for my project, But i am following error when running flutter run

../../../flutter/.pub-cache/hosted/pub.dartlang.org/carousel_slider-4.2.1/lib/carousel_slider.dart:304:7: Error: No named parameter with the name 'padEnds'.
      padEnds: widget.options.padEnds,                                  
      ^^^^^^^                                                           
../../../flutter/packages/flutter/lib/src/widgets/page_view.dart:664:3: Context: Found this candidate, but the arguments don't match.
  PageView.builder({                                                    
  ^^^^^^^^^^^^^^^^                                                      

FAILURE: Build failed with an exception.                                

* Where:                                                                
Script '/Users/surajg/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1035

* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildDebug'.              
> Process 'command '/Users/surajg/flutter/bin/flutter'' finished with non-zero exit value 1

could anyone pls help me to resolve the issue ? Thanks!!

MatheusFelix1796 commented 1 year ago

I was able to solve this by downgrading the plugin (flutter carousel) version at podspec, because my current flutter version still did not have the new padEnds property... so you can try either upgrading your flutter version or downgrading the carousel_slider pkg version (I use the carousel at 4.0.0).