2

In all Project while building - facing this error. After flutter upgrade I'm facing this error. I've tried with all upgrade and invalidate cache and all - but when I run the project found this exception.

[+37924 ms] 
            Compiler message:
[   +6 ms] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/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'.
[   +1 ms]         animation: animation,
[   +1 ms]         ^^^^^^^^^
[        ] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
[        ]   CupertinoFullscreenDialogTransition({
[   +1 ms]   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[+96166 ms] Compiler message:
[        ] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/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,
[        ]         ^^^^^^^^^
[        ] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
[        ]   CupertinoFullscreenDialogTransition({
[        ]   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[+13876 ms] Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
[   +1 ms] build failed.
[ +618 ms] FAILURE: Build failed with an exception.
[  +14 ms] * Where:
[        ] Script 'D:\FlutterSDK\flutter_windows_v1.5.4-hotfix.2-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 883
[        ] * What went wrong:
[        ] Execution failed for task ':app:compileFlutterBuildDebug'.
[        ] > Process 'command 'D:\FlutterSDK\flutter_windows_v1.5.4-hotfix.2-stable\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.
[        ] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 2m 28s
  • The `animation` parameter was split and renamed by https://github.com/flutter/flutter/pull/50180. Because there apparently are no existing tests that use `CupertinoFullscreenDialogTransition`, that change did not break any tests and was not deemed to be a breaking change. – jamesdlin Apr 07 '20 at 09:00
  • @jamesdlin, ok got it, I was expecting the same - but how to find such info in a pull request that I don't know. one question of how to resolve this? what should I need to do for that? – Pankaj Sakariya Apr 08 '20 at 04:45
  • From the `Error: No named parameter with the name 'animation'.` error message, it's clear that the `CupertinoFullscreenDialogTransition` constructor parameters changed. From there I searched the `flutter` git repository for where `CupertinoFullscreenDialogTransition` is implemented, ran `git blame` to see what commit modified the parameter, and looked at its commit description to find the referenced pull request. – jamesdlin Apr 08 '20 at 05:33
  • Can you tell us what packages/plugin you are using in pubspec.yaml file in your project – Sanjeev Sangral May 13 '20 at 07:23
  • I had the same problem, this fix my project : [See](https://stackoverflow.com/a/61802299/5982350) – Ahmed Sa'eed May 14 '20 at 16:29

1 Answers1

0

You need to check the name of the parameters set on the constructor as mentioned in the error: Found this candidate, but the arguments don't match. CupertinoFullscreenDialogTransition

The error points to this parameter: Error: No named parameter with the name 'animation'.

Checking the docs for CupertinoFullscreenDialogTransition, the constructor requires primaryRouteAnimation and secondaryRouteAnimation.

Omatt
  • 8,564
  • 2
  • 42
  • 144