You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you are on web and click on a message text or start selecting text you get spam of Null check operator used on a null value errors in the browser console
Sometimes the text selection misbehave because of that too
Steps to reproduce
1. Open chat on web
2. Open dev tools console
3. Try to selecttextin the message bubble
Supporting info to reproduce
This is an issue with use MarkdownBody inside stream_chat_flutter/lib/src/message_widget/message_text.dart
The flutter_markdown docs has this sections:
Yet StreamMessageText sets selectable to true for web and desktop, but the onTapText and onSelectionChanged are never set, which causes the error to be thrown.
Relevant log output
No response
Flutter analyze output
No response
Flutter doctor output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
We are using flutter_markdown 0.6.17+1, in this version's documentation there is no Selection section. Furthermore, I cannot reproduce this error in our example project. Have you overridden this dependency in your project?
Also the selectable field is used to create a SelectableText.rich which has onTap and onSelectionChanged optional, so I am not really sure how this could produce a Null check operator used on a null value error.
I see, your dependency is not an exact version but flutter_markdown: ^ so it accepts the higher versions, so even when we're not overriding this but create a fresh project, pubspec will fetch the latest matching version which is not compatible (checked now your example project and it fetched flutter_markdown 0.6.23 in pubspec.lock)
So clone the repo, run example app on chrome, open chat, try to select text in any message, or tap the text etc. -> bunch of errors in the dev console Null check operator used on a null value
Which packages are you using?
stream_chat_flutter
On what platforms did you experience the issue?
Web, Windows, MacOS, Linux
What version are you using?
Latest
What happened?
When you are on web and click on a message text or start selecting text you get spam of
Null check operator used on a null value
errors in the browser consoleSometimes the text selection misbehave because of that too
Steps to reproduce
Supporting info to reproduce
This is an issue with use
MarkdownBody
insidestream_chat_flutter/lib/src/message_widget/message_text.dart
The
flutter_markdown
docs has this sections:Yet
StreamMessageText
setsselectable
totrue
for web and desktop, but theonTapText
andonSelectionChanged
are never set, which causes the error to be thrown.Relevant log output
No response
Flutter analyze output
No response
Flutter doctor output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: