nested method

Widget nested([
  1. int index = 0
])

Implementation

Widget nested([int index = 0]) {
  if (index >= stateHolders.length) {
    return child;
  }
  var current = stateHolders.elementAt(index);
  return current.copyWith(child: nested(index + 1));
}