filterSheetAutoAnimation method
Animates the WhatsApp filter sheet.
If up
is true
, it animates the sheet upwards.
Otherwise, it animates the sheet downwards.
Implementation
void filterSheetAutoAnimation(bool up, Function setState) async {
if (up) {
while (filterShowHelper < 120) {
filterShowHelper += 4;
setState(() {});
await Future.delayed(const Duration(milliseconds: 1));
}
} else {
while (filterShowHelper > 0) {
filterShowHelper -= 4;
setState(() {});
await Future.delayed(const Duration(milliseconds: 1));
}
}
}