RdfEnumValue constructor

const RdfEnumValue(
  1. String value
)

Creates an annotation that customizes the serialization value for an enum constant.

The value parameter specifies the custom serialization value to use instead of the enum constant name. This value must be non-empty and unique within the enum.

Example:

enum Priority {
  @RdfEnumValue('HIGH')
  high,

  @RdfEnumValue('MEDIUM')
  medium,

  @RdfEnumValue('LOW')
  low,
}

Implementation

const RdfEnumValue(this.value);