createPost method
- PostModel data
Creates a post with the given data.
Implementation
Future<CreatePostResult> createPost(PostModel data) async {
return instance
.collection('posts')
.doc(data.postID)
.set(data.toJson())
.then((_) => CreatePostResult.successful);
}