Skip to main content

addNewPost method

void addNewPost (Post newPost)

<p>This function adds new Post.</p> <p>params:</p> <ul> <li><code>newPost</code></li> </ul>

Implementation

void addNewPost(Post newPost) \{
_posts.insert(0, newPost);
notifyListeners();
\}