| @@ -4,21 +4,24 @@ class CropPlot { | |||
| TbCropDTO? tbCropDTO; | |||
| List<Activities>? activities; | |||
| String? sowingDate; | |||
| String? plantingDate; | |||
| int? soakSeedsTime; | |||
| num? seedIncubationTime; | |||
| int? numberPlants; | |||
| int? numberCurrentPlants; | |||
| String? endOfFarmingDate; | |||
| CropPlot( | |||
| {this.tbCropDTO, | |||
| this.activities, | |||
| this.sowingDate, | |||
| this.soakSeedsTime, | |||
| this.seedIncubationTime, | |||
| this.numberPlants, | |||
| this.numberCurrentPlants, | |||
| this.endOfFarmingDate}); | |||
| CropPlot({ | |||
| this.tbCropDTO, | |||
| this.activities, | |||
| this.sowingDate, | |||
| this.plantingDate, | |||
| this.soakSeedsTime, | |||
| this.seedIncubationTime, | |||
| this.numberPlants, | |||
| this.numberCurrentPlants, | |||
| this.endOfFarmingDate, | |||
| }); | |||
| CropPlot.fromJson(Map<String, dynamic> json) { | |||
| tbCropDTO = json['tbCropDTO'] != null ? new TbCropDTO.fromJson(json['tbCropDTO']) : null; | |||
| @@ -29,6 +32,7 @@ class CropPlot { | |||
| }); | |||
| } | |||
| sowingDate = json['sowingDate']; | |||
| plantingDate = json['plantingDate']; | |||
| soakSeedsTime = json['soakSeedsTime']; | |||
| seedIncubationTime = json['seedIncubationTime']; | |||
| numberPlants = json['numberPlants']; | |||
| @@ -141,15 +141,11 @@ class _PlotInformationScreenState extends State<PlotInformationScreen> with Auto | |||
| WidgetRowPlotInfo( | |||
| color: AppColors.DEFAULT.withOpacity(0.1), | |||
| name: 'Ngày gieo trồng', | |||
| value: cropPlot.tbCropDTO?.tbCropTypeId == 0 | |||
| ? '${cropPlot.tbCropDTO?.startDate?.format_DDMMYY_HHmm() ?? '--'}' | |||
| : '--'), | |||
| value: cropPlot.tbCropDTO?.tbCropTypeId == 0 ? '${cropPlot.plantingDate?.format_DDMMYY_HHmm() ?? '--'}' : '--'), | |||
| WidgetRowPlotInfo( | |||
| color: AppColors.DEFAULT.withOpacity(0.3), | |||
| name: 'Ngày vô khây ươm', | |||
| value: cropPlot.tbCropDTO?.tbCropTypeId == 1 | |||
| ? '${cropPlot.tbCropDTO?.startDate?.format_DDMMYY_HHmm() ?? '--'}' | |||
| : '--'), | |||
| value: cropPlot.tbCropDTO?.tbCropTypeId == 1 ? '${cropPlot.sowingDate?.format_DDMMYY_HHmm() ?? '--'}' : '--'), | |||
| WidgetRowPlotInfo( | |||
| color: AppColors.DEFAULT.withOpacity(0.1), | |||
| name: 'Thời gian ngâm hạt', | |||