setCurrentPage method

Future<bool> setCurrentPage(
  1. int position
)

设置当前页面位置 position 页面索引值

平台支持:

  • ✅ Android: IDJXWidget.setCurrentPage(position)
  • ❌ iOS: 无对应方法

🔵 Android 独有方法

Implementation

Future<bool> setCurrentPage(int position) async {
  _ensureReady();
  try {
    final result = await PangrowthContent.setCurrentPageDramaSwipeFlow(
      _swipeFlowId!,
      position,
    );
    debugPrint('DramaSwipeFlowController: 设置当前页到 $position - $_swipeFlowId');
    return result;
  } catch (e) {
    debugPrint('DramaSwipeFlowController: 设置当前页失败 - $e');
    rethrow;
  }
}