deviceProfileProvisionTypeFromString function

DeviceProfileProvisionType deviceProfileProvisionTypeFromString(
  1. String? value
)

Implementation

DeviceProfileProvisionType deviceProfileProvisionTypeFromString(String? value) {
  if (value == null) {
    return DeviceProfileProvisionType.DISABLED;
  }
  return DeviceProfileProvisionType.values.firstWhere(
      (e) => e.toString().split('.')[1].toUpperCase() == value.toUpperCase());
}