setCurrentOrganizationName method
void setCurrentOrganizationName (String updatedOrganization)
This function sets the organization name after update.
params:
updatedOrganization
: updated organization name.
Implementation
void setCurrentOrganizationName(String updatedOrganization) {
// if `updatedOrganization` is not same to `_currentOrgName`.
if (updatedOrganization != _currentOrgName) {
_posts.clear();
_renderedPostID.clear();
_currentOrgName = updatedOrganization;
notifyListeners();
}
// _postService.getPosts();
}