bool isSelected(int dotIndex) { if(widget.singleSelection != true) { return dotIndex <= _currentPageIndex; } return dotIndex == _currentPageIndex; }