mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 08:55:12 +00:00
fix: Blurhash crashes on height 0
This commit is contained in:
parent
e76781a24b
commit
5f94ecf1a0
1 changed files with 2 additions and 0 deletions
|
@ -52,8 +52,10 @@ class ImageBubble extends StatelessWidget {
|
||||||
var height = 32;
|
var height = 32;
|
||||||
if (ratio > 1.0) {
|
if (ratio > 1.0) {
|
||||||
height = (width / ratio).round();
|
height = (width / ratio).round();
|
||||||
|
if (height <= 0) height = 1;
|
||||||
} else {
|
} else {
|
||||||
width = (height * ratio).round();
|
width = (height * ratio).round();
|
||||||
|
if (width <= 0) width = 1;
|
||||||
}
|
}
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: this.width,
|
width: this.width,
|
||||||
|
|
Loading…
Reference in a new issue