LikeType toLikeType(int? index) { switch (index) { case 0: return LikeType.like; case 1: return LikeType.dislike; } return LikeType.unknown; }