define<T> static method
Define a factory for a specific type.
The builder function receives a NyFaker instance for generating
random data and should return an instance of type T.
Example:
NyFactory.define<User>((faker) => User(
name: faker.name(),
email: faker.email(),
));
Implementation
static void define<T>(T Function(NyFaker faker) builder) {
_definitions[T] = FactoryDefinition<T>(builder);
}