calculatePosition function
calculate position of old cards based on current position
Implementation
double calculatePosition(
List<MuqSnackbar> toastBars, MuqSnackbar self) {
if (toastBars.isNotEmpty && self != toastBars.last) {
final box = self.info.key.currentContext?.findRenderObject() as RenderBox?;
if (box != null) {
return gapBetweenCard * (toastBars.length - toastBars.indexOf(self) - 1);
}
}
return 0;
}