calculatePosition method
Implementation
double calculatePosition(int index, double totalWidth) {
var widthExcludingIndicators = totalWidth - indicatorWidth * 3;
var spaceSplitByIndicators = widthExcludingIndicators / 6;
var usedByOffIndicators = index * indicatorWidth;
var spacesCountBeforeCurrentIndicator = index * 2 + 1;
var usedBySpaces = spacesCountBeforeCurrentIndicator * spaceSplitByIndicators;
return usedBySpaces + usedByOffIndicators;
}