unsubscribeApi function

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

unsubscribe api function

Implementation

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