addNewhashtag method
Implementation
Future<HashtagModel?> addNewhashtag(tagName) {
Log(
logName: 'AddNewhashtag',
className: 'Hashtag',
methodName: 'addNewhashtag',
type: 'INFO',
text:
'{event: Add New hashtag, user: ${currentUser?.userPayloadId}, user is ${currentUser?.firstName} ${currentUser?.lastName}, tag name: $tagName',
);
return _httpService.addNewhashtag(tagName: tagName).then((data) async {
if (data.statusCode >= 200 && data.statusCode < 300) {
var res = json.decode(data.body);
HashtagModel tagData = HashtagModel.fromJson(res[0]);
return tagData;
}
return null;
});
}