[flutter_markdown] Invalid image URI crashes the app (instead of just showing an error at the image area) #158428
Labels
a: images
Loading, displaying, rendering images
c: crash
Stack traces logged to the console
found in release: 3.24
Found to occur in 3.24
found in release: 3.27
Found to occur in 3.27
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: flutter_markdown
flutter/packages flutter_markdown
P2
Important issues not at the top of the work list
package
flutter/packages repository. See also p: labels.
team-ecosystem
Owned by Ecosystem team
triaged-ecosystem
Triaged by Ecosystem team
Steps to reproduce
https
from the URI in the text field.Markdown
widget.Expected results
The image is not rendered, and an error widget is used instead like below.
Actual results
The Markdown widget itself causes an error, and then, to make matters worse, the whole app stops working.
This means that when my app has a Markdown editing feature, just a user's mistype in an image URI in the Markdown image notation will get the user into trouble. Nothing can be done any more and the editor content is lost (unless the app has state restoration logic). As long as it can happen, I cannot use the package for production.
FYI, the error differs depending on the typo:
://
ttps://
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: