getConstructor abstract method
Gets a constructor by its declared name.
Parameters:
name: The constructor name (empty string for default constructor)
Returns:
- The matching constructor if found
nullif no matching constructor exists
Example:
class Point {
Point.origin() : x = 0, y = 0;
}
final constructor = Class.forType<Point>().getConstructor('origin');
For factory constructors, include the 'factory' prefix:
getConstructor('factory fromJson');
Implementation
Constructor? getConstructor(String name);