Open heckad opened 3 years ago
You can already use as
for the entire library in order to disambiguate colliding names:
import 'package:firebase_auth/firebase_auth.dart' as firebase_auth;
import 'other_library_with_user.dart' as other;
main() {
var user1 = firebase_auth.User();
var user2 = other.User();
}
With non-function type aliases, you can also do:
import 'package:firebase_auth/firebase_auth.dart' as firebase_auth;
typedef User = firebase_auth.FirebaseUser;
Given that, I think it's unlikely to be worth supporting renaming on import too, though it's conceivably something we could do.
Motivation: Sometimes different packages have the same public names.
Exmaple