flutter_desktop: set event func to async

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-09-11 19:52:38 -07:00
parent aa6e747e8a
commit efe6d080f3
7 changed files with 37 additions and 45 deletions

View File

@@ -28,10 +28,10 @@ Future<ui.Image> decodeImageFromPixels(
pixelFormat: format,
);
if (!allowUpscaling) {
if (targetWidth != null && targetWidth! > descriptor.width) {
if (targetWidth != null && targetWidth > descriptor.width) {
targetWidth = descriptor.width;
}
if (targetHeight != null && targetHeight! > descriptor.height) {
if (targetHeight != null && targetHeight > descriptor.height) {
targetHeight = descriptor.height;
}
}