title: Get the name of a Dart class as a Type or String
body: <h2>Problem I need to solve</h2>
  <p>Is there a way to get the class name of a <code>dart class</code> as a <code>String</code> or a <code>Type</code> object..?</p>
  <pre><code>class MyClass {
  }
  var myClass = MyClass();
  </code></pre>
  <p>I know the <code>property</code>, <code>runtimeType</code> which return the type of the object as a <code>Type</code> object. But is there a similar function for classes?</p>
  <pre><code>print(myClass.runtimeType.toString());
  </code></pre>
  <p>What I currently do is creating an object of the class and use <code>runtimeType</code>.</p>
  <pre><code>String type = MyClass().runtimeType.toString();
  </code></pre>
  <p>Note: In <code>python</code> there is a variable called <code>__name__</code> in every class, which does what I need.</p>
  <h2>My intention</h2>
  <p>My final goal is to create dart objects using previously saved class names. In <a href="https://github.com/flutter/flutter/issues/17766" rel="noreferrer">this issue</a> they have proposed a method using <code>Map</code>s. <br>
  The thing is that I have lots of classes and that method looks messy in my situation.</p>
  <p>What I currently do is, save the object type by:</p>
  <pre><code>var saving = myClass.runtimeType.toString();
  </code></pre>
  <p>And when loading:</p>
  <pre><code>if (saving == MyClass().runtimeType.toString()) {
      return MyClass();
  }
  </code></pre>
  <p>From your experiences and opinions, can you propose a better solution?</p>