toggleFavorite method
收藏故事
storyId 故事ID
isFavorite 是否收藏
Implementation
Future<bool> toggleFavorite(String storyId, bool isFavorite) async {
try {
return await PangrowthContent.favoriteStory(
storyId,
isFavorite: isFavorite,
);
} catch (e) {
debugPrint('收藏操作失败: $e');
return false;
}
}