fix: mobile cursor, check null (#8481)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-06-26 19:49:52 +08:00 committed by GitHub
parent faf363cfd2
commit f17e17a6b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -938,9 +938,13 @@ class CursorPaint extends StatelessWidget {
}
final image = m.image ?? preDefaultCursor.image;
if (image == null) {
return Offstage();
}
final minSize = 24.0;
double mins =
minSize / (image!.width > image.height ? image.width : image.height);
minSize / (image.width > image.height ? image.width : image.height);
double factor = 1.0;
if (s < mins) {
factor = s / mins;