SampledData constructor

SampledData({
  1. Quantity? origin,
  2. num? period,
  3. num? factor,
  4. num? lowerLimit,
  5. num? upperLimit,
  6. int? dimensions,
  7. String? data,
})

Constructs a new SampledData with details about sampling.

Implementation

SampledData({
  Quantity? origin,
  num? period,
  num? factor,
  num? lowerLimit,
  num? upperLimit,
  int? dimensions,
  String? data,
}) : this.fromJson(
        JsonObject({
          if (origin != null) originField.name: origin.json,
          if (period != null) periodField.name: JsonNumber(period),
          if (factor != null) factorField.name: JsonNumber(factor),
          if (lowerLimit != null)
            lowerLimitField.name: JsonNumber(lowerLimit),
          if (upperLimit != null)
            upperLimitField.name: JsonNumber(upperLimit),
          if (dimensions != null)
            dimensionsField.name: JsonNumber(dimensions),
          if (data != null) dataField.name: JsonString(data),
        }),
      );