getWaterLineFieldDtoFromJson static method

RemoteDto getWaterLineFieldDtoFromJson(
  1. Map<String, dynamic> jo,
  2. SchemaMetaData smdSys
)

Implementation

static RemoteDto getWaterLineFieldDtoFromJson(Map<String, dynamic> jo, SchemaMetaData smdSys) {
  int? value, localTs, remoteTs;
  NotifyState? notifyState;
  if (jo.containsKey("notify_state")) {
    notifyState = WaterLineField.getNotifyState(jo["notify_state"]);
  }
  if (jo.containsKey("value_number")) value = jo["value_number"];
  if (jo.containsKey("local_ts")) localTs = jo["local_ts"];
  if (jo.containsKey("remote_ts")) remoteTs = jo["remote_ts"];
  WaterLineFieldDto waterLineFieldDto = WaterLineFieldDto.sep(
      jo["id"],
      jo["table_field_id"],
      WaterLineField.getChangeType(jo["change_type"]),
      jo["user_id"],
      notifyState,
      value,
      null,
      localTs,
      remoteTs,
      smdSys);
  return RemoteWaterLineFieldDto(waterLineFieldDto, smdSys);
}