setScreenWidth method
Implementation
void setScreenWidth(double width) {
screenWidth = width;
int singleScreenCandleCount = getSingleScreenCandleCount(screenWidth);
int maxCount = this.klineTotalList.length;
int firstScreenNum =
(getFirstScreenScale() * singleScreenCandleCount).toInt();
if (singleScreenCandleCount > maxCount) {
firstScreenNum = maxCount;
}
firstScreenCandleCount = firstScreenNum;
getSubKlineList(0, firstScreenCandleCount ?? 0);
}