Role.of constructor
Role.of(
- 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),
};