DataItem.fromJson constructor

DataItem.fromJson(
  1. dynamic json
)

Implementation

DataItem.fromJson(dynamic json) {
  if (json['invest_type'] != null) {
    _investType = [];
    json['invest_type'].forEach((v) {
      _investType?.add(InvestType.fromJson(v));
    });
  }
  if (json['invest_time'] != null) {
    _investTime = [];
    json['invest_time'].forEach((v) {
      _investTime?.add(InvestTime.fromJson(v));
    });
  }
}