MixinDeclarationImpl constructor

MixinDeclarationImpl({
  1. required CommentImpl? comment,
  2. required List<AnnotationImpl>? metadata,
  3. required Token? augmentKeyword,
  4. required Token? sealedKeyword,
  5. required Token mixinKeyword,
  6. required Token name,
  7. required TypeParameterListImpl? typeParameters,
  8. required OnClauseImpl? onClause,
  9. required ImplementsClauseImpl? implementsClause,
  10. required Token leftBracket,
  11. required List<ClassMemberImpl> members,
  12. required Token rightBracket,
})

Initialize a newly created mixin declaration. Either or both of the comment and metadata can be null if the mixin does not have the corresponding attribute. The typeParameters can be null if the mixin does not have any type parameters. Either or both of the onClause, and implementsClause can be null if the mixin does not have the corresponding clause. The list of members can be null if the mixin does not have any members.

Implementation

MixinDeclarationImpl({
  required super.comment,
  required super.metadata,
  required this.augmentKeyword,
  required this.sealedKeyword,
  required this.mixinKeyword,
  required super.name,
  required TypeParameterListImpl? typeParameters,
  required OnClauseImpl? onClause,
  required ImplementsClauseImpl? implementsClause,
  required this.leftBracket,
  required List<ClassMemberImpl> members,
  required this.rightBracket,
})  : _typeParameters = typeParameters,
      _onClause = onClause,
      _implementsClause = implementsClause {
  _becomeParentOf(_typeParameters);
  _becomeParentOf(_onClause);
  _becomeParentOf(_implementsClause);
  _members._initialize(this, members);
}