create<T> static method

List<T> create<T>({
  1. int count = 1,
  2. Map<String, dynamic>? overrides,
  3. List<String>? states,
})

Create multiple instances of type T.

Example:

final users = NyFactory.create<User>(count: 10);

Implementation

static List<T> create<T>({
  int count = 1,
  Map<String, dynamic>? overrides,
  List<String>? states,
}) {
  return List.generate(
    count,
    (_) => make<T>(overrides: overrides, states: states),
  );
}