getPost method

  1. @override
TimelinePost? getPost(
  1. String postId
)

Implementation

@override
TimelinePost? getPost(String postId) =>
    (posts.any((element) => element.id == postId))
        ? posts.firstWhere((element) => element.id == postId)
        : null;