getInstance<R> method
R
getInstance<R>(
- dynamic data
Implementation
R getInstance<R>(data) {
const reflector = Reflector();
final ClassMirror mirror = reflector.reflectType(R) as ClassMirror;
final instance = mirror.newInstance('fromJson', [data]);
return instance as R;
}