String type = MyClass(). runtimeType. toString(); Note: In python there is a variable called __name__ in every class, which does what I need.24 Nis 2019
Read moreHow can I get my class name?
The simplest way is to call the getClass() method that returns the class’s name or interface represented by an object that is not an array. We can also use getSimpleName() or getCanonicalName() , which returns the simple name (as in source code) and canonical name of the underlying class, respectively.
Read more