onReady method

  1. @protected
Future<void> onReady()

Called when the controller becomes ready.

Override this in subclasses to perform initialization that requires the view to be ready. The viewHandle is guaranteed to be available.

Example:

@override
Future<void> onReady() async {
  await super.onReady();
  // Perform custom initialization
  final pageCount = await document.getPageCount();
  debugPrint('Controller ready with $pageCount pages');
}

Implementation

@protected
Future<void> onReady() async {
  // Subclasses can override for custom initialization
}