createItem method
Future<void>
createItem(
- Map<
String, dynamic> itemDetails, { - List<
JsendStatusHandler> ? statusHandlers,
Implementation
Future<void> createItem(Map<String, dynamic> itemDetails,
{List<JsendStatusHandler>? statusHandlers}) async {
itemDetails.remove('_id');
(await jsendResponse.fromAPIRequest(
APIRequest(
path: endpoint,
payload: itemDetails,
method: 'POST',
),
onSuccess: (jsendResponse res) {
_setItem(_getSingluarDataFromJsendResponse(res));
},
statusHandlers: statusHandlers,
));
}