Role.of constructor

Role.of(
  1. String value
)

The value value; one outside the schema is kept as is.

Implementation

factory Role.of(String value) => switch (value) {
      'assistant' => assistant,
      'user' => user,
      _ => Role._(value),
    };