Passing class static factory as method parameter in Dart

Posted by Jessica Taylor | Updated on

Passing class static factory as method parameter in Dart. Dart currently does not allow using constructors as tear-offs. I recommend using a static method instead.

Alternatively you could just create an explicit closure:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers