title: What is the difference between using the is-operator and using the run-time type in Dart
body: <p>I have worked through the <a href="https://dart.dev/codelabs/iterables" rel="nofollow noreferrer">dart codelab for iterables</a> and stumbled upon this code fragment:</p>
  
  <pre><code>class EmailAddress {
    String address;
  
    EmailAddress(this.address);
  
    @override
    bool operator ==(Object other) =&gt;
        identical(this, other) ||
  (a)          other is EmailAddress &amp;&amp;
  (b)              runtimeType == other.runtimeType &amp;&amp;
                   address == other.address;
  ....
  </code></pre>
  
  <p>What is the difference between line (a) and line (b)? For me it seems like they do the same.
  Or more generally asked: What is the difference between using the is-operator and using the runtimeType property of an object for checking the run-time type in dart?</p>