Skip to content

Commit

Permalink
Merge pull request #502 from tneotia/feature/img-tag-svg-support
Browse files Browse the repository at this point in the history
Add basic support for svg elements in <img>
  • Loading branch information
ryan-berger authored Jan 17, 2021
2 parents 632e597 + 30b6e74 commit 6704b8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/replaced_element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ class ImageContentElement extends ReplacedElement {
return child;
},
);
} else if (src.endsWith(".svg")) {
return SvgPicture.network(src);
} else {
precacheImage(
NetworkImage(src),
Expand Down

0 comments on commit 6704b8e

Please sign in to comment.