Description
If you don't pass a value to the messages instance variable of ChatController or pass an empty List, executing scrollToMessage and scrollToIndex will not scroll to the specified message or index.
Platform
Web(Chrome)
*I have'nt checked it on Web other than Chrome, or on iOS or Android.
Steps to Reproduce
- Add a message using insertMessage.
- Execute scrollToMessage/scrollToIndex.
pubspec.yaml Excerpt from package's example
flutter:
sdk: flutter
flutter_chat_core: ^2.4.0
flutter_chat_ui: ^2.3.1
flyer_chat_file_message: ^2.1.6
flyer_chat_image_message: ^2.1.7
flyer_chat_system_message: ^2.1.6
flyer_chat_text_message: ^2.2.1
flyer_chat_text_stream_message: ^2.1.6
pubspec.yaml Excerpt from my project
flutter:
sdk: flutter
flutter_chat_ui: ^2.3.1
flutter_chat_core: ^2.4.0
flyer_chat_file_message: ^2.1.6
flyer_chat_image_message: ^2.1.7
flyer_chat_system_message: ^2.1.6
flyer_chat_text_message: ^2.2.1
This problem reproduces both in my project and in the local.dart of the package's example code.
It works properly if you pass a non-empty List to the ChatController's messages instance variable.
Thanks in advance for your help.