Closed codeOfJannik closed 3 months ago
Hello,
The error appears starting with rive
version 0.13.10
.
Version 0.13.9
doesn't export Image
. For now, we will stay on rive
0.13.9
so we "avoid" this error.
Sounds like a rive
issue which means the issue should be reported to the rive
package?
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 flutter_gen
must have been using aliases for imports in the first place. Otherwise, the issue might return.
We have a relatively long releasing procedure. If you're encountering the issue you can use the fix in the PR https://github.com/FlutterGen/flutter_gen/pull/548 by overriding dependencies.
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 flutter_gen
. This is what makes the Flutter community thrive, and it helps many.
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 rive
added Image class in the new version!
The issue is closed because the fix has been shipped through the v5.7.0 version.
The issue is closed because the fix has been shipped through the v5.7.0 version.
I am using v5.7.0 version. but there was the same issue
The issue is closed because the fix has been shipped through the v5.7.0 version.
I am using v5.7.0 version. but there was the same issue
Attach more details?
The issue is closed because the fix has been shipped through the v5.7.0 version.
I am using v5.7.0 version. but there was the same issue
Attach more details?
these are my current dependencies:
dependencies:
flutter:
sdk: flutter
rive: 0.13.13
flutter_svg: 2.0.10+1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: 4.0.0
build_runner: 2.4.12
flutter_gen_runner: 5.7.0
And this is the error :
Make sure they are both v5.7.0
Make sure they are both v5.7.0
Yes, they are.
Probably because you are using fluttergen
command rather than the build_runner, the discussion is out of the topic of the thread.
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