createPost method

Future<String> createPost(
  1. PostModel post
)

Implementation

Future<String> createPost(PostModel post) async {
  final docRef = await _firestore.collection('posts').add(
        post.toFirestoreCreate(),
      );
  return docRef.id;
}