getParameters abstract method

List<ParameterDeclaration> getParameters()

Returns all parameters required by this constructor.

This includes positional, named, and optional parameters in the order they are declared. Use this method to inspect constructor requirements before attempting instantiation.

Example

for (final param in constructor.getParameters()) {
  print('${param.getName()} : ${param.getType().getName()}');
}

Implementation

List<ParameterDeclaration> getParameters();