title: Dart named constructor, static method, and factory constructor
body: <p>Given the following code:</p>
  <pre class="lang-dart prettyprint-override"><code>const jsonString = '{&quot;myString&quot;:&quot;Hello&quot;}';
  final jsonMap = jsonDecode(jsonString);
  
  final myObject = MyClass.fromJson(jsonMap);
  </code></pre>
  <p>How many ways are there to create a new object using this syntax:</p>
  <pre class="lang-dart prettyprint-override"><code>MyClass.fromJson(jsonMap)
  </code></pre>
  <p><em>Recently I've been trying to understand the differences between named constructors, factory constructors and static methods so I'm posting my answer below so that I have something to come back to as a reference in the future.</em></p>