NotificationSeenFunction method
dynamic
NotificationSeenFunction({
- dynamic notId,
- dynamic type,
- dynamic context,
Implementation
NotificationSeenFunction({notId, type, context}) async {
var decodedResponse;
final ApiBody = {"notification_id": notId.toString(), "update_type": type};
try {
http.Response response = await http.post(
Uri.parse('${BASE_URL}notification_api/update'),
headers: {
"Authorization": currentUserToken,
},
body: ApiBody,
);
decodedResponse = json.decode(response.body);
SeenStatus = decodedResponse['status'];
} catch (e) {
ErrorListner(
apiname: 'notification_api/update',
responsed: "${decodedResponse}",
request: '${ApiBody}',
app_error: '${e}');
}
}