unsubscribeApiWithoutCtx function

Future unsubscribeApiWithoutCtx({
  1. BuildContext? context,
  2. List<String>? items,
})

unsubscribe api without ctx function

Implementation

Future unsubscribeApiWithoutCtx(
    {BuildContext? context, List<String>? items}) async {
  HtifyWithoutContext notify = HtifyWithoutContext.notification();
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  String notifyToken = prefs.getString('notify_token') ?? '';
  return await notify.put(
      context: context,
      '${routes['unSubscribeRoutes']}',
      payload: {"routes": items},
      header: {'Notifpal-Auth': notifyToken});
}