get method

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

Gets follower details by ID.

id is the ID of the follower. Returns the FollowerModel instance.

Implementation

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

  final payload = {};

  debugPrint("flutter_mon_sms_pro/follower/get/payload: $payload");

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

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

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

  return response;
}