get method
Gets a specific offer by ID.
id is the ID of the offer.
Returns the OfferModel instance.
Implementation
Future<ApiResponseModel<OfferModel?>> get({
required String id,
}) async {
final url = "$_baseUrl/offer/$id";
debugPrint("flutter_mon_sms_pro/offer/get/url: $url");
final r = await _dio.post(url, data: {
'apiKey': _apiKey,
});
debugPrint("flutter_mon_sms_pro/offer/get/data: ${r.data}");
final response = ApiResponseModel.fromJson(
r.data,
(data) => OfferModel.fromJson(data as Map<String, dynamic>),
);
return response;
}