title: When to use part/part of versus import/export in Dart?
body: <p>I do not completely understand the difference between <code>part</code>/<code>part of</code> and <code>import</code>/<code>export</code> when using libraries in Dart.  For example:</p>
  
  <pre><code>one.dart:
  library one;
  part "two.dart";
  Class One {
  };
  </code></pre>
  
  <p>and </p>
  
  <pre><code>two.dart:
  part of one;
  import 'somefile.dart';
  Class Two {
  }
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>library one;
  import 'two.dart';
  Class One {
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>library two;
  import 'somefile.dart';
  export 'somefile.dart';
  Class Two {
  }
  </code></pre>
  
  <p>Both scenarios seem to do the same thing.  When is it advantageous to use <code>part</code> and <code>part of</code> rather than <code>import</code>? And are there scenarios where <code>import</code> will not work, but <code>part</code> and <code>part of</code> will?</p>