Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: Found this candidate, but the arguments don't match

I am working on a flutter app and project was running perfectly but suddenly project isn't running and it is giving me an error.

Here is the error code i am getting when i try to run app

Compiler message:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/extended_image-0.7.2/lib/src/gesture/extended_image_slide_page_route.dart:333:9: Error: No named parameter with the name 'animation'.
        animation: animation,
        ^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.15.0/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  PictureStream();
  ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.15.0/lib/src/picture_stream.dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
abstract class PictureStreamCompleter extends Diagnosticable {
               ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/extended_image-0.7.2/lib/src/gesture/extended_image_slide_page_route.dart:333:9: Error: No named parameter with the name 'animation'.
        animation: animation,                                           
        ^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.15.0/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  PictureStream();
  ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.15.0/lib/src/picture_stream.dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
abstract class PictureStreamCompleter extends Diagnosticable {
               ^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.                                                           

FAILURE: Build failed with an exception.
                                                                        

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

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

BUILD FAILED in 43s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        44.9s
Exception: Gradle task assembleDebug failed with exit code 1
like image 493
Moaaz Mezo Avatar asked Apr 03 '20 13:04

Moaaz Mezo


2 Answers

Try add in your pubsepc.yaml flutter_svg: ^0.17.3+1. For me works

like image 167
Kheronn Avatar answered Nov 11 '22 16:11

Kheronn


Use the latest version of your package (flutter_svg: ^0.18.0)

It works for me

like image 7
Kaushik Borah Avatar answered Nov 11 '22 15:11

Kaushik Borah