enumDeclaration2 abstract method

EnumDeclaration enumDeclaration2({
  1. required Comment? comment,
  2. required List<Annotation>? metadata,
  3. required Token enumKeyword,
  4. required SimpleIdentifier name,
  5. required TypeParameterList? typeParameters,
  6. required WithClause? withClause,
  7. required ImplementsClause? implementsClause,
  8. required Token leftBracket,
  9. required List<EnumConstantDeclaration> constants,
  10. required Token? semicolon,
  11. required List<ClassMember> members,
  12. required Token rightBracket,
})

Returns a newly created enumeration declaration. Either or both of the comment and metadata can be null if the declaration does not have the corresponding attribute. The list of constants must contain at least one value.

Implementation

EnumDeclaration enumDeclaration2({
  required Comment? comment,
  required List<Annotation>? metadata,
  required Token enumKeyword,
  required SimpleIdentifier name,
  required TypeParameterList? typeParameters,
  required WithClause? withClause,
  required ImplementsClause? implementsClause,
  required Token leftBracket,
  required List<EnumConstantDeclaration> constants,
  required Token? semicolon,
  required List<ClassMember> members,
  required Token rightBracket,
});