double? getLength(int index, bool isHorizontal) { return isHorizontal ? _sizeMap[index]?.width : _sizeMap[index]?.height; }