# newInstance abstract method

T newInstance([

1. Map<String, dynamic>? arguments,
2. String? constructorName

])

Creates an instance using the default constructor.

Parameters:

- `constructorName`: The constructor name
- `arguments`: Optional named arguments for construction

Returns:

- A new instance of type T

Throws:

- `NoSuchMethodException` if no default constructor exists
- InvalidArgumentException for invalid arguments

Example:

    final user = userClass.newInstance({'name': 'Alice'}, 'origin');

## Implementation

    T newInstance([Map<String, dynamic>? arguments, String? constructorName]);