modelDecode<T> function
T
modelDecode<T>(
- dynamic data
Implementation
T modelDecode<T>(dynamic data) {
if (data is List) {
return data.convert<T>();
}
if (_factories.containsKey(T)) {
return _factories[T](data);
}
throw UnsupportedError('unsupported type');
}