showErrorToast function
- String discription
Shows a toast with the given message
for a long duration at the bottom of
the screen with a red background and white text.
Implementation
void showErrorToast(final String discription) {
toastification.show(
type: ToastificationType.error,
style: ToastificationStyle.minimal,
title: const Text('Error Happened'),
description: Text(discription),
alignment: Alignment.bottomCenter,
autoCloseDuration: const Duration(seconds: 4),
padding: const EdgeInsets.all(AppConstants.padding),
backgroundColor: AppRouter.theme.surface,
foregroundColor: AppRouter.theme.onSurface,
borderRadius: BorderRadius.circular(AppConstants.inBorderRadius),
closeButton: const ToastCloseButton(showType: CloseButtonShowType.none),
borderSide: BorderSide(
strokeAlign: BorderSide.strokeAlignCenter,
color: AppRouter.theme.outline.withAlpha(0x80),
),
dragToClose: true,
pauseOnHover: true,
showProgressBar: true,
);
}