getNestedList<T> function
Get a List
Specify depth
to added one or more parent Lists.
Example:
depth
0 = List
Implementation
List getNestedList<T>({
required int depth,
required List<T> valueList,
}) {
if (depth == 0) {
return valueList;
}
return getNestedList(depth: depth - 1, valueList: _addParent(valueList));
}