fromJson static method

Confidence fromJson(
  1. String? value
)

Converts a RoomPlan confidence string to its enum value. Unknown or missing values are treated as Confidence.low.

Implementation

static Confidence fromJson(String? value) => switch (value?.toLowerCase()) {
  'high' => Confidence.high,
  'medium' => Confidence.medium,
  _ => Confidence.low,
};