deserialize static method

DeviceFormFactor? deserialize(
  1. String? value
)

Deserializes a DeviceFormFactor from JSON, returning null for unknown values.

This is a safe deserializer that will not throw on unknown values, making the app resilient to new form factor values from the backend.

Implementation

static DeviceFormFactor? deserialize(String? value) {
  return safeEnumFromJson<DeviceFormFactor>(
    value,
    DeviceFormFactor.values,
  );
}