refactor: enhance chat page auto-scrolling behavior

- Introduced new state variables to manage auto-scrolling functionality.
- Implemented a method to calculate the distance from the bottom of the chat.
- Improved the logic for auto-scrolling to the bottom when new messages arrive or when the user is near the bottom.
- Refactored the scroll-to-bottom logic to enhance performance and user experience.
- Ensured that the auto-scroll behavior is only triggered when appropriate, preventing unnecessary scrolls.
This commit is contained in:
cogwheel0
2025-10-01 01:38:47 +05:30
parent 21cff39c1c
commit 5a4021aaa9
2 changed files with 76 additions and 19 deletions

1
tmp/flutter_ai_repo Submodule

Submodule tmp/flutter_ai_repo added at 79187cf7e3