scrollToLastMessage method

void scrollToLastMessage()

Function to scroll to last messages in chat view

Implementation

void scrollToLastMessage() => Timer(
      const Duration(milliseconds: 300),
      () => scrollController.animateTo(
        scrollController.position.minScrollExtent,
        curve: Curves.easeIn,
        duration: const Duration(milliseconds: 300),
      ),
    );