DartFunction.withName constructor

DartFunction.withName(
  1. String name,
  2. CodeNode body, {
  3. List<DocComment> docComments = const [],
  4. List<Annotation> annotations = const [],
  5. Type? returnType,
  6. Parameters? parameters,
  7. Asynchrony? asynchrony,
})

Implementation

DartFunction.withName(
  String name,
  CodeNode body, {
  this.docComments = const [],
  this.annotations = const [],
  this.returnType,
  this.parameters,
  this.asynchrony,
})  : name = IdentifierStartingWithLowerCase(name),
      body = Body([body]);