updateStory method
Future<bool?>
updateStory(
{ - dynamic id,
- dynamic attachedUrl,
- dynamic text,
- dynamic type,
})
Implementation
Future<bool?> updateStory({id, attachedUrl, text, type}) {
Log(
logName: 'UpdateStory',
className: 'Story',
methodName: 'updateStory',
type: 'INFO',
text:
'{event: Update Story, user: ${currentUser?.userPayloadId}}, user is ${currentUser?.firstName} ${currentUser?.lastName}, story info: id- $id, attachedUrl- $attachedUrl, text- $text, type- $type',
);
return _httpService
.updateStory(
storyId: id, attachedUrl: attachedUrl, text: text, type: type)
.then((data) async {
if (data.statusCode >= 200 && data.statusCode < 300) {
var res = json.decode(data.body);
return true;
}
return null;
});
}