FieldFormalParameterImpl constructor

FieldFormalParameterImpl({
  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 thisKeyword,
  8. required Token period,
  9. required Token? name,
  10. required TypeParameterListImpl? typeParameters,
  11. required FormalParameterListImpl? parameters,
  12. required Token? question,
})

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 there is a type. The type must be null if the keyword is 'var'. The thisKeyword and period can be null if the keyword 'this' was not provided. The parameters can be null if this is not a function-typed field formal parameter.

Implementation

FieldFormalParameterImpl({
  required super.comment,
  required super.metadata,
  required super.covariantKeyword,
  required super.requiredKeyword,
  required this.keyword,
  required TypeAnnotationImpl? type,
  required this.thisKeyword,
  required this.period,
  required super.name,
  required TypeParameterListImpl? typeParameters,
  required FormalParameterListImpl? parameters,
  required this.question,
})  : _type = type,
      _typeParameters = typeParameters,
      _parameters = parameters {
  _becomeParentOf(_type);
  _becomeParentOf(_typeParameters);
  _becomeParentOf(_parameters);
}