SimpleFormalParameterImpl constructor

SimpleFormalParameterImpl({
  1. required CommentImpl? comment,
  2. required List<AnnotationImpl>? metadata,
  3. required Token? covariantKeyword,
  4. required Token? requiredKeyword,
  5. required Token? keyword,
  6. required TypeAnnotationImpl? type,
  7. required Token? name,
})

Initialize a newly created formal parameter. Either or both of the comment and metadata can be null if the parameter does not have the corresponding attribute. The keyword can be null if a type was specified. The type must be null if the keyword is 'var'.

Implementation

SimpleFormalParameterImpl({
  required super.comment,
  required super.metadata,
  required super.covariantKeyword,
  required super.requiredKeyword,
  required this.keyword,
  required TypeAnnotationImpl? type,
  required super.name,
}) : _type = type {
  _becomeParentOf(_type);
}