deletePost method

  1. @override
Future<void> deletePost(
  1. TimelinePost post
)

Implementation

@override
Future<void> deletePost(TimelinePost post) async {
  posts = posts.where((element) => element.id != post.id).toList();
  var postRef = _db.collection(_options.timelineCollectionName).doc(post.id);
  await postRef.delete();
  notifyListeners();
}