update method
The update
method updates an existing entity.
Implementation
@override
FutureOr<Response> update(EntityModel entity) async {
return executeFuture(
future: () async {
return await dio.post(
updatePath,
data: entityName == 'User'
? {entityName: entity.toMap()}
: {
entityName: [entity.toMap()],
"apiOperation": "UPDATE",
},
);
},
);
}