calculate method
Implementation
@override
void calculate(int index, ScrollProgress info) {
if (info.dir == -1 && info.targetIndex == index) {
scale = 1 - info.progress;
return;
}
if (info.dir == -1 && info.currentIndex == index) {
scale = info.progress;
return;
}
if (info.dir == 1 && info.targetIndex == index) {
scale = info.progress;
return;
}
if (info.dir == 1 && info.currentIndex == index) {
scale = 1.0 - info.progress;
return;
}
scale = 0;
}