setData method
Set list of instances.
List should not contain multiple instances with same type. Also list should not contain null.
If recursive
is true
than
Implementation
void setData(Iterable<T> data, {bool recursive = false}) {
data.forEach(recursive ? _addRecursive : _addInstance);
}