Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: no named parameter colorFilter when running app #356

Open
1 task done
kuyazee opened this issue Feb 10, 2023 · 4 comments
Open
1 task done

[BUG]: no named parameter colorFilter when running app #356

kuyazee opened this issue Feb 10, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@kuyazee
Copy link

kuyazee commented Feb 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Version

^5.2.0

Command type

build_runner (Default)

What happened?

I'm using flutter_gen with flutter_svg

The latest build seems to be incompatible with flutter_svg

Relevant a pubspec.yaml.

name: asdasdasd
description: asdasd

version: 3.0.0+22112100
publish_to: none

environment:
  sdk: ">=2.18.0 <3.0.0"
  flutter: 3.3.3

dependencies:
  flutter:
    sdk: flutter
  flutter_svg: ^1.1.6

dev_dependencies:
  build_runner: ^2.3.3
  flutter_gen_runner: ^5.1.0+1
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.1
  flutter_gen: ^5.1.0+1

flutter:
  uses-material-design: true
  generate: true
  assets:
    - assets/images/
    - assets/l10n/
    - assets/env/
    - assets/icons/
    - assets/google_fonts/

flutter_gen:
  output: lib/generated/
  integrations:
    flutter_svg: true

Relevant log output

: Error: No named parameter with the name 'colorFilter'.
assets.gen.dart:636
          colorFilter: colorFilter,
          ^^^^^^^^^^^
: Context: Found this candidate, but the arguments don't match.
svg.dart:329
      SvgPicture.asset(
      ^^^^^^^^^^^^^^^^


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@kuyazee kuyazee added the bug Something isn't working label Feb 10, 2023
@kuyazee kuyazee mentioned this issue Feb 10, 2023
8 tasks
@kwado-tech
Copy link

Hey @kuyazee when will this fix be available on pub.dev? Currently facing the same issues.

@bakeyevrus
Copy link

I started to have the same problem when I downgraded the flutter_svg version from 2.0.1 to 1.1.6. If possible, you can try to update flutter_svg to the latest version.

@tientruongvan1995
Copy link

tientruongvan1995 commented Feb 27, 2023

image

I set the flutter_gen_runner to fixed version, delete flutter_gen and rerun flutter pub run build_runner build command.
Maybe this can help you

@CuongNV12
Copy link

You need to upgrade flutter_svg to newer version.
Or use flutter_gen: 5.1.0+1 or older for flutter_svg: 1.1.6 by using: dart pub global activate flutter_gen 5.1.0+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants