bot_toast
bot_toast copied to clipboard
Multiple toasts overlap
Describe the bug When multiple toasts are triggered, they animate over each other.
To Reproduce Steps to reproduce the behavior:
- Trigger a
showCustomNotification. Use the code below:
void botToast() {
BotToast.showCustomNotification(
align: Alignment.bottomCenter,
enableSlideOff: true,
onlyOne: false,
crossPage: true,
animationDuration: _toastDuration,
animationReverseDuration: _toastDuration,
backButtonBehavior: BackButtonBehavior.ignore,
dismissDirections: [DismissDirection.down, DismissDirection.horizontal],
duration: _autoCloseDuration,
toastBuilder: (cancelFunc) {
return _CoreToastV2.generic(
cancel: cancelFunc,
message:
'Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old',
);
},
wrapToastAnimation: (controller, cancelFunc, widget) {
return SizeTransition(
sizeFactor: controller,
axis: Axis.horizontal,
fixedCrossAxisSizeFactor: 1,
child: widget,
);
},
);
}
- Trigger it multiple times.
Expected behavior I would prefer to have a the ability to customize this behavior.
Screenshots https://github.com/user-attachments/assets/a1d54b32-fcc1-4407-811c-1b9857ebaa89
Version (please complete the following information):
- Flutter Version: v3.24.0
- OS: iOS 17.5
- BotToast Version : 4.1.3
This cannot be avoided if onlyOne is set to false.
@MMMzq I understand. I think it would be great to allow the developer to customize how multiple toasts animate. Like should they overlap or should they animate animate on the top like they are in a column, etc.