dataModelFromJson method

void dataModelFromJson(
  1. dynamic data,
  2. dynamic model, [
  3. dynamic dataController
])

Implementation

void dataModelFromJson(data, model,[dataController]){

  List repData = data['data'];

  List list = [];

  repData.forEach((json) => list.add(model.from(json)));

  inDataController.add(list);

}