TF-1594 Use only one class TmailToast to display the message.
(cherry picked from commit 379c34b32b2e5c4dad141e6a98bdb92597fa6908)
This commit is contained in:
@@ -151,11 +151,9 @@ class ForwardController extends BaseController {
|
||||
|
||||
void _handleDeleteRecipientSuccess(DeleteRecipientInForwardingSuccess success) {
|
||||
if (currentOverlayContext != null && currentContext != null) {
|
||||
_appToast.showToastWithIcon(
|
||||
_appToast.showToastSuccessMessage(
|
||||
currentOverlayContext!,
|
||||
message: AppLocalizations.of(currentContext!).toastMessageDeleteRecipientSuccessfully,
|
||||
icon: _imagePaths.icSelected,
|
||||
);
|
||||
AppLocalizations.of(currentContext!).toastMessageDeleteRecipientSuccessfully);
|
||||
}
|
||||
|
||||
currentForward.value = success.forward;
|
||||
@@ -255,11 +253,9 @@ class ForwardController extends BaseController {
|
||||
|
||||
void _handleAddRecipientsSuccess(AddRecipientsInForwardingSuccess success) {
|
||||
if (currentOverlayContext != null && currentContext != null) {
|
||||
_appToast.showToastWithIcon(
|
||||
_appToast.showToastSuccessMessage(
|
||||
currentOverlayContext!,
|
||||
message: AppLocalizations.of(currentContext!).toastMessageAddRecipientsSuccessfully,
|
||||
icon: _imagePaths.icSelected,
|
||||
);
|
||||
AppLocalizations.of(currentContext!).toastMessageAddRecipientsSuccessfully);
|
||||
}
|
||||
|
||||
currentForward.value = success.forward;
|
||||
@@ -283,13 +279,11 @@ class ForwardController extends BaseController {
|
||||
|
||||
void _handleEditLocalCopySuccess(EditLocalCopyInForwardingSuccess success) {
|
||||
if (currentOverlayContext != null && currentContext != null) {
|
||||
_appToast.showToastWithIcon(
|
||||
_appToast.showToastSuccessMessage(
|
||||
currentOverlayContext!,
|
||||
message: success.forward.localCopy ?
|
||||
AppLocalizations.of(currentContext!).toastMessageLocalCopyEnable :
|
||||
AppLocalizations.of(currentContext!).toastMessageLocalCopyDisable,
|
||||
icon: _imagePaths.icSelected,
|
||||
);
|
||||
success.forward.localCopy
|
||||
? AppLocalizations.of(currentContext!).toastMessageLocalCopyEnable
|
||||
: AppLocalizations.of(currentContext!).toastMessageLocalCopyDisable);
|
||||
}
|
||||
|
||||
currentForward.value = success.forward;
|
||||
|
||||
@@ -133,19 +133,9 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
|
||||
controller.addRecipientAction(context, listRecipientsSelected);
|
||||
},
|
||||
onExceptionCallback: () {
|
||||
_appToast.showBottomToast(
|
||||
_appToast.showToastErrorMessage(
|
||||
context,
|
||||
AppLocalizations.of(context).incorrectEmailFormat,
|
||||
leadingIcon: SvgPicture.asset(
|
||||
_imagePaths.icNotConnection,
|
||||
width: 24,
|
||||
height: 24,
|
||||
colorFilter: Colors.white.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
backgroundColor: AppColor.toastErrorBackgroundColor,
|
||||
textColor: Colors.white,
|
||||
textActionColor: Colors.white,
|
||||
maxWidth: _responsiveUtils.getMaxWidthToast(context));
|
||||
AppLocalizations.of(context).incorrectEmailFormat);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user