fromMap static method

PostLikeEntity? fromMap(
  1. Object? o, {
  2. Map<String, String>? newDocumentIds,
})

Implementation

static PostLikeEntity? fromMap(Object? o,
    {Map<String, String>? newDocumentIds}) {
  if (o == null) return null;
  var map = o as Map<String, dynamic>;

  return PostLikeEntity(
    postId: map['postId'],
    postCommentId: map['postCommentId'],
    memberId: map['memberId'],
    timestamp: map['timestamp'] == null
        ? null
        : (map['timestamp'] as Timestamp).millisecondsSinceEpoch,
    appId: map['appId'],
    likeType: map['likeType'],
  );
}