forceScrollToTop method

void forceScrollToTop()

Scrolls to a specific message directly with maximum reliability This is a more direct approach for ensuring the first message is visible

Implementation

void forceScrollToTop() {
  if (_scrollController?.hasClients != true) return;

  try {
    // Force scroll to the very top first (0.0)
    _scrollController!.jumpTo(0.0);
    debugPrint('FORCE SCROLL: Jumped to absolute top position');
  } catch (e) {
    debugPrint('ERROR FORCE SCROLLING: $e');
  }
}