Special Cases

Nullable Modddels

The collection of the IterableEntity or Iterable2Entity can hold nullable modddels. For example :

/// ListEntity example
factory TodoList({
  required List<Todo?> todos,
}) //...

/// MapEntity example
factory BookMap({
  required Map<Author, Book?> booksByAuthors,
}) //...

If a modddel is null, it is considered valid during the contentValidationStep.

If you want a nullable modddel to cause a failure when it's null, you should use the @NullFailure annotation.