fromString static method

AnthropicCacheTtl? fromString(
  1. String? value
)

Create from string value

Implementation

static AnthropicCacheTtl? fromString(String? value) {
  if (value == null) return null;
  switch (value) {
    case '5m':
      return AnthropicCacheTtl.fiveMinutes;
    case '1h':
      return AnthropicCacheTtl.oneHour;
    default:
      return null;
  }
}