delete method
Deletes a device.
id is the ID of the device to delete.
Returns success status.
Implementation
Future<ApiResponseModel<bool?>> delete({
required String id,
}) async {
final url = "$_baseUrl/device/$id/delete";
final payload = {
'apiKey': _apiKey,
};
debugPrint("flutter_mon_sms_pro/device/delete/payload: $payload");
final r = await _dio.post(url, data: payload);
debugPrint("flutter_mon_sms_pro/device/delete/data: ${r.data}");
final response = ApiResponseModel.fromJson(
r.data,
(data) => data as bool?,
);
return response;
}