dart.libraries.dio.serialization.json_serializable.enum.mustache Maven / Gradle / Ivy
import 'package:json_annotation/json_annotation.dart';
{{#description}}/// {{{description}}}{{/description}}
{{#isDeprecated}}
@Deprecated('{{{classname}}} has been deprecated')
{{/isDeprecated}}
enum {{{classname}}} {
{{#allowableValues}}
{{#enumVars}}
{{^isNull}}
{{#description}}
/// {{{.}}}
{{/description}}
@JsonValue({{#isString}}r{{/isString}}{{{value}}})
{{{name}}}({{^isString}}'{{/isString}}{{#isString}}r{{/isString}}{{{value}}}{{^isString}}'{{/isString}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
{{/isNull}}
{{/enumVars}}
{{/allowableValues}}
const {{{classname}}}(this.value);
final String value;
@override
String toString() => value;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy