skkallayath / photofilters

photofilters library for flutter
MIT License
403 stars 135 forks source link

Context: Found this candidate, but the arguments don't match. Image copyResize(Image src, {int width, int height,) #8

Closed Rahulxx01 closed 5 years ago

Rahulxx01 commented 5 years ago

Facing this issue unable to build app in both Android and IOS

PiotrWpl commented 5 years ago

It's because of Image dependency, where API has changed from version 2.1.0 -> https://github.com/brendan-duncan/image/blob/master/CHANGELOG.md#210---may-15-2019

KickedDroid commented 5 years ago

How would I fix this?

PiotrWpl commented 5 years ago

There are some options ;) But probably the quickest one for You will be to override Image library version to 2.0.9. Please read details how to do that here: https://stackoverflow.com/questions/23031384/how-to-specify-dependency-overrides-in-pubspec-yaml

Fortunately, it should work without above hack when this pull request will be accepted -> https://github.com/skkallayath/photofilters/pull/11

KickedDroid commented 5 years ago

@PiotrWpl thank you I figured it out! It works as in it compiles but now it just loads forever 😭

Rahulxx01 commented 5 years ago

@AIDXNZ What did you did to make it work???

Udaychinthala commented 5 years ago

yes it is not loading the image any Suggestions?

skkallayath commented 5 years ago

Please use the latest version v1.0.4 from pub. The build issue is fixed now.

Shtibel commented 5 years ago

Getting this error:

Compiler message:
file:///Users/dushy/flutter/.pub-cache/hosted/pub.dartlang.org/photofilters-1.0.4/lib/widgets/photo_filter.dart:326:40: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
  params["image"] = imageLib.copyResize(params["image"], width);
                                       ^
file:///Users/dushy/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.4/lib/src/transform/copy_resize.dart:14:7: Context: Found this candidate, but the arguments don't match.
Image copyResize(Image src, {int width, int height,
      ^^^^^^^^^^
Compiler failed on /Users/dushy/flutterApps/photofilters-master/lib/main.dart
Error launching application on iPhone XÊ€.
Exited (sigterm)
skkallayath commented 5 years ago

It was a problem with versions of the dependent packages.

Try v1.0.5 from flutter pub