Instantiate a class from a string
In dart is it possible to instantiate a class from a string? For example: vanilla in javascript: var myObject = window[classNameString]; Objective-C: id myclass = [[NSClassFromString(@"MyClass") alloc] init]; You need to know the library name and class name to make things work properly. Assume you know both, the below example will instantiate the TestClass and call doStuff on it. library test; import "dart:mirrors"; class TestClass { doStuff() => print("doStuff was called!"); } main() { MirrorSystem mirrors = currentMirrorSystem(); LibraryMirror lm = mirrors.libraries['test']; ClassMirror cm =