ResultAccumulationConfiguration.fromJson constructor

ResultAccumulationConfiguration.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ResultAccumulationConfiguration.fromJson(Map<String, dynamic> json) =>
    ResultAccumulationConfiguration(
      confirmationMethod: json.containsKey("confirmationMethod")
          ? ConfirmationMethod.values
              .byName(json["confirmationMethod"] as String)
          : ConfirmationMethod.EXACT,
      minConfirmations: json.containsKey("minConfirmations")
          ? (json["minConfirmations"] as int)
          : 3,
      minConfidenceForStableField:
          json.containsKey("minConfidenceForStableField")
              ? (json["minConfidenceForStableField"] as num).toDouble()
              : 0.8,
      autoClearThreshold: json.containsKey("autoClearThreshold")
          ? (json["autoClearThreshold"] as int)
          : 4,
    );