Closed jetpeter closed 1 year ago
Same Issue. For what it's worth: Releasing an update with a (breaking) method signature change as only a patch update (2.0.3 to 2.0.4) is a mistake.
Hi, may I know when the issue will be resolved? Thanks,
It will probably be a few days+. Easy fix is to change your flutter_svg from ^2.0.x to 2.0.3 without the carrot so it uses that exact version. 2.0.3 will work with the current flutter_gen.
@FlutterGen team, when can we expect this to be resolved?
For someone who is still stuck with this bug, there is on review PR which will resolve this issue.
(It's a bit hack though..) You can temporarily change clipBehavior
in asset.g.dart file like below.
Clip clipBehavior = Clip.hardEdge,
I am using code generation. As a temporary solution, these steps are helped me to fix the errors:
Error: The argument type 'Clip?' can't be assigned to the parameter type 'Clip' because 'Clip?', colorFilter Error: No named parameter with the name 'colorFilter'.
1) Specify versions of flutter_gen_runner: 5.1.0+1 (without carrot) and flutter_svg: 1.1.4 (without carrot) 2) Go to local pub cache and remove all flutter_gen and flutter_svg versions (for example, my path is /Users/eprakopenko/.pub-cache/hosted/pub.dev) 3) flutter clean 4) flutter pub get 5) flutter pub run build_runner build --delete-conflicting-outputs
Any update for this?
Any update for this?
Is there an existing issue for this?
Version
5.2.0
Command type
build_runner (Default)
What happened?
Generated code has:
The argument type 'Clip?' can't be assigned to the parameter type 'Clip'.
This is casued by flutter_svg changing the parameter Clip? to Clip: clipBehavior = Clip.hardEdge and removing the deprecated annotation.
https://github.com/dnfield/flutter_svg/blame/master/lib/svg.dart#L181
See flutter_svg 2.0.4
Relevant a pubspec.yaml.
No response
Relevant log output
No response
Code of Conduct