0

Hello from here I know that I can create an instance from a String:

How to get a Class name dynamically (from a string) in Dart, then create an instance?

but How do I create an instance of a Generic class from a String, ie:

var class_name = "GenericController<Book>"; // user input here
new class_name();
2

1 Answer 1

2

This is not currently possible (as you probably noticed). There's an open case in the Dart issue tracker you should Star to show your interest:

https://code.google.com/p/dart/issues/detail?id=12921

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.