| @@ -22,9 +22,9 @@ class CropPlot { | |||
| tbCropDTO = json['tbCropDTO'] != null | |||
| ? new TbCropDTO.fromJson(json['tbCropDTO']) | |||
| : null; | |||
| if (json['activityTimeline'] != null) { | |||
| if (json['activities'] != null) { | |||
| activities = new List<Activities>(); | |||
| json['activityTimeline'].forEach((v) { | |||
| json['activities'].forEach((v) { | |||
| activities.add(new Activities.fromJson(v)); | |||
| }); | |||
| } | |||
| @@ -42,8 +42,7 @@ class CropPlot { | |||
| data['tbCropDTO'] = this.tbCropDTO.toJson(); | |||
| } | |||
| if (this.activities != null) { | |||
| data['activityTimeline'] = | |||
| this.activities.map((v) => v.toJson()).toList(); | |||
| data['activities'] = this.activities.map((v) => v.toJson()).toList(); | |||
| } | |||
| data['sowingDate'] = this.sowingDate; | |||
| data['soakSeedsTime'] = this.soakSeedsTime; | |||
| @@ -49,7 +49,7 @@ abstract class RestClient { | |||
| //Crop | |||
| @GET( | |||
| "/api/tb-crops-detail/{cropId}?page={page}&size={size}&sort=executeDate,DESC") | |||
| "/api/tb-crops-detail-for-app/{cropId}?page={page}&size={size}&sort=executeDate,DESC") | |||
| Future<CropPlot> getCropDetail(@Path() int cropId, | |||
| {@Path() int page = 0, @Path() int size = 20}); | |||
| @@ -214,7 +214,7 @@ class _RestClient implements RestClient { | |||
| queryParameters.removeWhere((k, v) => v == null); | |||
| final _data = <String, dynamic>{}; | |||
| final Response<Map<String, dynamic>> _result = await _dio.request( | |||
| '/api/tb-crops-detail/$cropId?page=$page&size=$size&sort=executeDate,DESC', | |||
| '/api/tb-crops-detail-for-app/$cropId?page=$page&size=$size&sort=executeDate,DESC', | |||
| queryParameters: queryParameters, | |||
| options: RequestOptions( | |||
| method: 'GET', | |||