title: Duplicate Class in Dart
body: <p>I am writing a simple application to learn some basic Dart programming but I can't work out the structure and inclusions - I get a Duplicate class Point</p>
  
  <p>First of all, I have my main class I called <em>MouseTrack</em>. It initializes the list and will have a loop.</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>#import('dart:html');
  #import('Eye.dart');
  
  class MouseTrace {
  List&lt;Eye&gt; eyes;
  ...
  }
  </code></pre>
  
  <p>Secondly, I have a class called <em>Eye</em>, which is supposed to hold information of of an eye as a circle. It's quite simple:</p>
  
  <pre class="lang-dart prettyprint-override"><code>#library('app:eye');
  
  #import('dart:html'); // without this one, I get no error but I want to have it to use CanvasRenderingContext2D
  
  #import('Point.dart');
  
  class Eye {
    Point position;
    num radius;
  
    Eye() :
        position = new Point() {
    }
  
    void draw(CanvasRenderingContext2D context) {
      // draws a circle
    }
  }
  </code></pre>
  
  <p>And finally <em>Point</em>:</p>
  
  <pre class="lang-dart prettyprint-override"><code>#library('app:point');
  
  class Point {
      num x, y;
  
      Point(this.x, this.y);
  }
  </code></pre>
  
  <p>What I want to achieve is 3 separate classes - <em>main</em>, <em>Eye</em> and <em>Point</em>, so I can have instances of <em>Eye</em> in <em>main</em> (for simplicity &amp; nice model) and instances of <em>Point</em> in <em>Eye</em> (for storing position). At least that's how I'm used to doing. </p>
  
  <p>P.S I know I can skip types but I want it there and I guess it's a problem with inclusions rather than the language (and want to fix it so I know how to do it properly).
  P.S.S. I have cut off some code so that you don't have to read everything but, if you want, I will post it all.</p>