deletePost method

Future<void> deletePost(
  1. String id
)

Deletes a post with the given id.

Implementation

Future<void> deletePost(String id) async {
  instance.collection('posts').doc(id).delete().catchError(
    (error) {
      debugPrint("Error deleting post: $error");
    },
  );
}