fromJSON method

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

Implementation

@override
void fromJSON(json) {
  if (json is List) {
    _value = json.map((element) {
      final T entity = DataModel.getType(genericType).constructor() as T;
      return entity..fromJSON(element);
    }).toList();
  }
}