fitHeight method

  1. @override
int fitHeight()
override

Calculates the total height required to fit all children, including the childGap between them.

Implementation

@override
int fitHeight() {
  int height = 0;
  for (final child in childrenInstance) {
    height += child.fitHeight();
  }
  height += max(0, childrenInstance.length - 1) * childGap;
  return height;
}