updateLogo method

Future<ApiResponseModel<FollowerModel?>> updateLogo({
  1. required String id,
})

Updates follower logo/photo.

id is the ID of the follower. logo is the base64 encoded image or URL. Returns the updated FollowerModel instance.

Implementation

Future<ApiResponseModel<FollowerModel?>> updateLogo({
  required String id,
  required String logo,
}) async {
  final url = "$_baseUrl/follower/$id/update/logo";

  final payload = {
    'logo': logo,
  };

  debugPrint("flutter_mon_sms_pro/follower/updateLogo/payload: updating logo");

  final r = await _dio.post(url, data: payload);

  debugPrint("flutter_mon_sms_pro/follower/updateLogo/data: ${r.data}");

  final response = ApiResponseModel.fromJson(
    r.data,
    (data) => FollowerModel.fromJson(data as Map<String, dynamic>),
  );

  return response;
}