Ad

Flutter Package's Own Import Target URI Does Not Exist

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?

Ad

Answer

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.

Ad
source: stackoverflow.com
Ad