Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

URI doesn't exist in flutter

this is very basic problem that it has drove me crazy.

in flutter in the main file i want to import my "post_model" and "myapi" file to use their classes . and i can’t import them . and i have no idea why!!!!!!!!!

here its the picture of my files . and the error i get.. look at the red lines that doesn’t allow me to import!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

the error is URI doesn’t exist .

enter image description here

and what i don’t understand is that there is no problem in importing in another file like in "in my api dart" .

the problem occurs just in main.dart file.!!

please help me . please .

enter image description here

>Solution :

First, move your api and models directory inside lib directory.

Then use the package:<your application name>/model/post_model.dart syntax rather than the relative path.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading