showErrorToast static method
Implementation
static void showErrorToast(
BuildContext context, String title, String message) {
if (toastTimer == null || !toastTimer!.isActive) {
_overlayEntry = createOverlayEntry(context, title, message,
const Color(0xFFD6292E), const Color(0xFFEEE0DF));
Overlay.of(context).insert(_overlayEntry!);
toastTimer = Timer(const Duration(seconds: 3), () {
if (_overlayEntry != null) {
_overlayEntry?.remove();
}
});
}
}