title: How to import a dart file from a directory from a local file?
body: <p>I am a student and very new to flutter/dart so I am incredibly sorry if I make mistakes along the way or just sound like a noob.</p>
  
  <p>I have an application I am currently working on and I have some classes I want to import.</p>
  
  <p>I want to make a simple console application, but do not copy and to always have the same updated classes how do I import the classes from a folder.</p>
  
  <p>I tried the following:</p>
  
  <p>made a folder called "WindowsApp"</p>
  
  <p>made another folder called "lib" (because for some reason it is the only I can run the main)</p>
  
  <p>made a file "main.dart"</p>
  
  <p>and had the following code</p>
  
  <pre class="lang-dart prettyprint-override"><code>import '&lt;directory&gt;\\foo.dart';
  
  void main(){ 
   print('test');
  }
  
  </code></pre>
  
  <p>Does it say that the directory doesn't exist? In java, I remember doing something similar and it worked, but I seem to not have the same logic work here.</p>
  
  <p>The research I have done it is still foggy as to what to do because one answer is to use Source, another provided what I wanted, but didn't show the code and the code that was shown introduced a new thing called the library. Is there no simple way like java where you just put in the directory and that is it?</p>
  
  <p>Do I need a full-blown project with a YAML and all if I wanted to use APIs and such?</p>