Why is flutter not detecting locally made packages?

Viewed 18

I have been assisting with building an app with Flutter.

My senior shared the repo with me, however when I cloned it, all of the import packages had a 'uri not found' error.

I ran flutter pub get, and all of the external packages work. However the locally made packages, such as 'package:projectname/utils/utils.dart' still have an error.

How can I fix this? Preferably the fix is in my enviroment. I do not want to change any of the code since it works for him. TIA.

enter image description here

1 Answers
pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  stackoverflow_pkg:
        path: C:\Users\xxxxx\flutter_projects\stackoverflow\stackoverflow_pkg 

 code:
 import 'package:stackoverflow_pkg/stackoverflow_pkg.dart';
Related