Flutter package's own import target URI does not exist

Issue

I have a Flutter project that I started as a package in order for it to speak to platform specific native code. I’ve updated several packages lately along with flutter and my

import: package: mypackage/mypackage.dart

is no longer working. The dart analysis says the target URI doesn’t exist and none of the of solutions for outside packages seem to work for me. Any ideas on how I can correct this issue?

Solution

I corrected the issue by downloading the clone that I recently pushed to git. I read through several entries that it could be related to pushing to git – especially is you forced a push.

If this is your situation 1) archive your local working copy 2) clone your project back from github/gitlab 3) run flutter packages get and flutter clean

If you understand how force pushing your project to git may effect package URI dependencies, please elaborate.

Answered By – Charles Jr

Answer Checked By – Mildred Charles (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *