title: How to build Null Factory Constructors with Null Safety?
body: <p>A common Dart pattern before null safety for creating static method holder classes was the following:</p>
  <pre class="lang-dart prettyprint-override"><code>class MyMethodScope {
    /// Prevents instantiation of this class.
    factory MyMethodScope._() =&gt; null;
  
    static void noop() {}
  }
  </code></pre>
  <p>This is not possible with <strong>null safety</strong> because the return type of a factory constructor is not nullable apparently.</p>