subscribeApiWithoutCtx function
subscribe api without ctx function
Implementation
Future subscribeApiWithoutCtx(
{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['subscribeRoutes']}',
payload: {"routes": items},
header: {'Notifpal-Auth': notifyToken});
}