toggleLike method

Future<bool> toggleLike(
  1. String storyId,
  2. bool isLiked
)

点赞故事 storyId 故事ID isLiked 是否点赞

Implementation

Future<bool> toggleLike(String storyId, bool isLiked) async {
  try {
    return await PangrowthContent.likeStory(storyId, isLiked: isLiked);
  } catch (e) {
    debugPrint('点赞操作失败: $e');
    return false;
  }
}