Flutter:找到这个候选人,但参数不匹配 [英] Flutter: Found this candidate, but the arguments don't match

查看:17
本文介绍了Flutter:找到这个候选人,但参数不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Flutter 应用程序并且项目运行良好,但突然项目没有运行,它给了我一个错误.

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:flutterinflutter.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

推荐答案

尝试在您的 pubsepc.yaml flutter_svg: ^0.17.3+1 中添加.对我有用

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

这篇关于Flutter:找到这个候选人,但参数不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆