my_app/lib/
foo1.dart
foo2.dart
foo2.dart references some classes in foo1.dart.
import "foo1.dart"
import "package:my_app/foo1.dart"
VSC dart editor can add either of above automatically. Which one should be used?
The second one contains the project name (my_app). If the project name is changed, all the imports in code needs to be changed.
If the first one is better, why VSC uses the 2nd import format for importing code from the same project?
1