-
-
Notifications
You must be signed in to change notification settings - Fork 167
[BUG]: Import conflict: Image class defined in flutter and rive #545
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
Comments
Hello, The error appears starting with Version |
Sounds like a |
Why? If the rive package needs to export the image class they can do that. The flutter_gen rive import statement should be adjusted to hide Image from rive |
Not hide, but |
We have a relatively long releasing procedure. If you're encountering the issue you can use the fix in the PR #548 by overriding dependencies. |
Hello, Just wanted to say thank you for the upcoming fix and the ongoing support of |
its better to use import alias just like mockito generator) |
The Issue is closed, anyway I fixed problem by using older version of rive(0.13.5). Idk why contributors of |
The issue is closed because the fix has been shipped through the v5.7.0 version. |
Is there an existing issue for this?
Version
5.6.0
Command type
build_runner (Default)
What happened?
Out of nowhere we started to get an error in the generated file that a image class is found both in
package/flutter/...widgets.dart
andpackage/rive
:The name 'Image' is defined in the libraries 'package:flutter/src/widgets/image.dart (via package:flutter/widgets.dart)' and 'package:rive/src/rive_core/shapes/image.dart (via package:rive/rive.dart)'.
Anyone else already faced that issue? Has anything changed in the package?
Or did something change in rive, e.g. they started to export the image class so it's visible?
A workaround for now is to add a
hide Image
to the rive import manually after theassets.gen.dart
file has been generated.Our assets folder contains png, jpg, svg and riv files.
Relevant a pubspec.yaml.
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: