Skip to content

Commit 484eb2b

Browse files
authored
Added missing width & height for SvgPicture from asset
1 parent 5de96d7 commit 484eb2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/image_render.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ ImageRender assetImageRender({
7575
(context, attributes, element) {
7676
final assetPath = _src(attributes)!.replaceFirst('asset:', '');
7777
if (_src(attributes)!.endsWith(".svg")) {
78-
return SvgPicture.asset(assetPath);
78+
return SvgPicture.asset(
79+
assetPath,
80+
width: width ?? _width(attributes),
81+
height: height ?? _height(attributes));
7982
} else {
8083
return Image.asset(
8184
assetPath,

0 commit comments

Comments
 (0)