massiveEditNotificationsWithSendingIdsList static method
void
massiveEditNotificationsWithSendingIdsList(
- Map? authInbox,
- Map params,
- dynamic onSuccess()?,
- dynamic onError(
- ErrorModel error
Edit one or more notifications state with SendingId list
param Map with auth config para Map with the list os sendingId and new status Callback to get InboxNotification on success Throw ErrorModel if there is some error during the processs
Implementation
static void massiveEditNotificationsWithSendingIdsList(
Map? authInbox,
Map params,
Function()? onSuccess,
Function(ErrorModel error)? onError) async {
params["auth"] = authInbox;
await _indigitall
.invokeMapMethod(_ACTION_MASSIVE_EDIT, params)
.then((value) => {
if (value != null)
{
value.forEach((key, valueMap) {
if (key == _CALLBACK_MASSIVE_EDIT) {
if (onSuccess != null) onSuccess();
}
})
}
})
.catchError((error) => {
if (error is PlatformException)
{
if (onError != null)
onError(ErrorModel(error.code, error.message))
}
});
}