Skip to content

Commit ed75f8f

Browse files
authored
Fix: Aspect ratio exception when height is 0 (#1222)
1 parent 07f112a commit ed75f8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/custom_render.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ double _aspectRatio(
536536
if (heightString != null && widthString != null) {
537537
final height = double.tryParse(heightString);
538538
final width = double.tryParse(widthString);
539-
return height == null || width == null
539+
return height == null || width == null || height == 0.0
540540
? calculated.data!.aspectRatio
541541
: width / height;
542542
}

0 commit comments

Comments
 (0)