Using type aliases

You can safely use type aliases for the factory constructor parameters. They will be automatically expanded in the generated classes.

typedef MultiList<T> = List<List<T>>;

// ...

// Then in the factory constructor :
factory Travel({
  required MultiList<String> documents,
}) // { ... }