Reputation: 449
I have customised a Flutter package and therefore it's outside of my lib folder.
Structure:
I want to import file.dart into package_file.dart. How can I achieve this? Tried import 'package:project_name/lib/file.dart' but it says URI not exist.
Upvotes: 1
Views: 792
Reputation: 983
You should have pubspec.yaml in your package module and declare your project root file packages yaml's dependencies like this :
dependencies:
ROOT_PROJECT_NAME:
path: ../../ROOT_PROJECT_NAME
Upvotes: 2