Parameter constructor

Parameter({
  1. required String name,
  2. required TypeDeclaration type,
  3. int? offset,
  4. String? defaultValue,
  5. bool? isNamed,
  6. bool? isOptional,
  7. bool? isPositional,
  8. bool? isRequired,
  9. List<String> documentationComments = const <String>[],
})

Parametric constructor for Parameter.

Implementation

Parameter({
  required super.name,
  required super.type,
  super.offset,
  super.defaultValue,
  bool? isNamed,
  bool? isOptional,
  bool? isPositional,
  bool? isRequired,
  super.documentationComments,
})  : isNamed = isNamed ?? false,
      isOptional = isOptional ?? false,
      isPositional = isPositional ?? true,
      isRequired = isRequired ?? true;