How to call a named constructor from a generic function in Dart/Flutter
Dart does not support instantiating from a generic type parameter. It doesn’t matter if you want to use a named or default constructor (T() also does not work). There is probably a way to do that on the server, where dart:mirrors (reflection) is available (not tried myself yet), but not in Flutter or the browser. … Read more