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

The name 'Image' is defined in the libraries 'package:flutter/src/widgets/image.dart' and 'package:rive/src/rive_core/shapes/image.dart (via package:rive/rive.dart)'. #421

Closed
KyoShio opened this issue Sep 13, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@KyoShio
Copy link

KyoShio commented Sep 13, 2024

No description provided.

@KyoShio KyoShio added the bug Something isn't working label Sep 13, 2024
@HayesGordon
Copy link
Contributor

Hey @KyoShio you can specify an import prefix to avoid this:

import 'package:rive/rive.dart' as rive;

Or optionally you can hide classes:

import 'package:rive/rive.dart' hide Image;

In the future we can maybe consider exposing an alias for the Image name, but there may always be clashes with Rive and the Flutter namespace. Closing this as it's not a bug.

@Sarat-1997
Copy link

@HayesGordon Thanks a lot bro!!

@SampleAssistRusira
Copy link

This solution doesn't work for me.

I removed all the Image usages in the app but I still get this error when I run it

@gdaegeun539
Copy link

Is there any plan to change rive's image class name?

I just upgrade my project flutter version 3.16.9 to 3.19.6 and rive 0.13.4 to 0.13.20, but all of my project files display collision of Image class...

@HayesGordon
Copy link
Contributor

No plans @gdaegeun539, we have many clashing names, especially for upcoming features. The trade off would be to preface everything with Rive*

It's a common problem on all of our runtimes, and we prefer suggesting using a namespace for Rive

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