toggleFavorite method

Future<void> toggleFavorite()

切换收藏状态

Implementation

Future<void> toggleFavorite() async {
  if (!_checkInitialized('toggleFavorite')) return;

  try {
    await PangrowthContent.invoke('storyReaderToggleFavorite', {
      'readerId': _readerId,
    });
  } catch (e) {
    debugPrint('StoryReaderController: toggleFavorite失败: $e');
  }
}