init method
Implementation
void init(GalleryItemConfig itemConfig) {
this.itemConfig = itemConfig;
unitAngle = 360 / itemCount;
// perimeter = calculatePerimeter(itemConfig.width * 0.8, 50);
perimeter = calculatePerimeter(widgetWidth * 0.7, 50);
_galleryItemTransformInfoList.clear();
for (var i = 0; i < itemCount; i++) {
var itemAngle = getItemAngle(i);
_galleryItemTransformInfoList.add(_GalleryItemTransformInfo(
index: i,
angle: itemAngle,
scale: calculateScale(itemAngle),
offset: calculateOffset(itemAngle)));
}
}