2

I am trying to debug a flutter project. The program is throwing error because widget_test.dart is unable to import main.dart

I usually create projects with Intellij. This is the first project I created with Visual Studio Code.

enter image description here

I am unable to clear this error message

Target of URI doesn't exist: 'package:ipl_test2/main.dart'.

what is the cause of this error? and how to clear this error?

2
  • could you check your pubspec.yaml ? what's the name of your project? (1st line) Commented Apr 6, 2019 at 4:47
  • Ahhh! my bad! the name is different. Thanks a lot @diegoveloper Commented Apr 6, 2019 at 4:48

1 Answer 1

1

You must use the same name of what you describe in your pubspec.yaml file, specifically the name property.

import 'package:change_the_name_here/main.dart';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.