fromJSON method

  1. @override
void fromJSON(
  1. dynamic value
)
override

Implementation

@override
void fromJSON(dynamic value) {
  final ModelType typeMapping = DataModel.getType(genericType);
  final T instance = typeMapping.constructor() as T;
  if (value != null) {
    instance.fromJSON(value);
  }
  this.value = instance;
}