What is the difference between package import and normal import in flutter?

Saying that there is no difference at all might be tricky. Because importing files as packages in some place and as simple files in another, dart will consider them two different namespaces. So it can cause type conflicts. The safe way to do it is to choose one method to do it and stick to it.


There's no performance differences or anything like that.

But.. it is better to use package paths because you won't need to edit all your imports in case you move your file to another location (as they're not relative paths).

Tags:

Dart

Flutter