subscribeApi function

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

subscribe api function

Implementation

Future subscribeApi(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['subscribeRoutes']}',
      payload: {"routes": items}, header: {'Notifpal-Auth': notifyToken});
}