Steps to create an IterableEntity / Iterable2Entity
Declare your class this way :
/// ListEntity example////// This will hold a list of [Todo]sclassTodoListextendsListEntity<InvalidTodoList, ValidTodoList> with_$TodoList {}/// MapEntity example////// This will hold a map where the keys are [Author]s and values /// are [Book]sclassBookMapextendsMapEntity<InvalidBookMap, ValidBookMap> with_$BookMap {}
You can now run the generator, and then override and implement the "validate" methods. Note that the "validate" method of the contentValidation is automatically generated, and you should never override it (Your IDE's Quick Fix won't override it neither).
When using some Dartz collections (ISetEntity, IMapEntity...), you also need to override the $getOrder method.