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

Handle potentially aliased imports #19

Open
kevmoo opened this issue Jul 21, 2017 · 2 comments
Open

Handle potentially aliased imports #19

kevmoo opened this issue Jul 21, 2017 · 2 comments

Comments

@kevmoo
Copy link
Collaborator

kevmoo commented Jul 21, 2017

It's really not safe to reference Map or String in the case where someone does import "dart:core" as foo; – in practice this should be rare.

Same for other types. In general, we just write out the type name w/ out worrying about imports.

@pavanpodila
Copy link

This is also an issue where the same class name collides with others from the std library or Flutter. Eg. I have an Action class that needs an import alias else it collides with the Action in Flutter SDK.

@Rexios80
Copy link

I just added support for library prefixes to hive_ce: https://github.com/IO-Design-Team/hive_ce/blob/3a322857b8bfc6ed2ae98001e26d7576cb7a42ee/hive_generator/lib/src/class_builder.dart#L225

Would that be a reasonable solution here as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants