All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dart-dio.enum_inline.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
class {{{enumName}}} extends EnumClass {

  {{#allowableValues}}
    {{#enumVars}}
      {{#description}}
  /// {{{.}}}
      {{/description}}
  @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{^isInteger}}wireName: r{{#lambda.escapeBuiltValueEnum}}{{{value}}}{{/lambda.escapeBuiltValueEnum}}{{/isInteger}})
  static const {{{enumName}}} {{name}} = _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}_{{name}};
    {{/enumVars}}
  {{/allowableValues}}

  static Serializer<{{{enumName}}}> get serializer => _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}Serializer;

  const {{{enumName}}}._(String name): super(name);

  static BuiltSet<{{{enumName}}}> get values => _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}Values;
  static {{{enumName}}} valueOf(String name) => _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}ValueOf(name);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy