unsubscribe method
Unsubscribes from a company.
id is the ID of the follower.
companyId is the ID of the company to unsubscribe from.
Returns success status.
Implementation
Future<ApiResponseModel<bool?>> unsubscribe({
required String id,
required String companyId,
}) async {
final url = "$_baseUrl/follower/$id/following/$companyId/unsubscribe";
final payload = {};
debugPrint("flutter_mon_sms_pro/follower/unsubscribe/payload: $payload");
final r = await _dio.post(url, data: payload);
debugPrint("flutter_mon_sms_pro/follower/unsubscribe/data: ${r.data}");
final response = ApiResponseModel.fromJson(
r.data,
(data) => (data as Map<String, dynamic>)['unsubscribed'] as bool?,
);
return response;
}