From 7f56800427fbb2906d44dd704129383173cf80fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyanghuaxuan=E2=80=9D?= <“646903573@qq.com”> Date: Thu, 15 Apr 2021 18:32:24 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E6=95=B4=E6=88=AA=E5=9B=BE=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/widgets/share/share_alert_select.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/widgets/share/share_alert_select.dart b/lib/widgets/share/share_alert_select.dart index bb12631..18d97ae 100644 --- a/lib/widgets/share/share_alert_select.dart +++ b/lib/widgets/share/share_alert_select.dart @@ -112,7 +112,7 @@ class _ShareAlertSelectState extends State { RenderRepaintBoundary boundary = buildContext.findRenderObject(); ///pixelRatio是放大倍数 - ui.Image image = await boundary.toImage(pixelRatio: 3); + ui.Image image = await boundary.toImage(pixelRatio: 5); // 注意:png是压缩后格式,如果需要图片的原始像素数据,请使用rawRgba ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png); Uint8List pngBytes = byteData.buffer.asUint8List(); @@ -381,7 +381,7 @@ class _ShareAlertContentState extends State<_ShareAlertContent> { } if (_shareDataModel?.poster != null) { - File file = await EncodeUtil.compressImage(context, images: _shareDataModel?.poster, size: 400); + File file = await EncodeUtil.compressImage(context, images: _shareDataModel?.poster, size: 500); _shareDataModel.poster = file.readAsBytesSync(); Loading.dismiss(); }