|
@@ -112,7 +112,7 @@ class _ShareAlertSelectState extends State<ShareAlertSelect> { |
|
|
RenderRepaintBoundary boundary = buildContext.findRenderObject(); |
|
|
RenderRepaintBoundary boundary = buildContext.findRenderObject(); |
|
|
|
|
|
|
|
|
///pixelRatio是放大倍数 |
|
|
///pixelRatio是放大倍数 |
|
|
ui.Image image = await boundary.toImage(pixelRatio: 5); |
|
|
|
|
|
|
|
|
ui.Image image = await boundary.toImage(pixelRatio: 3); |
|
|
// 注意:png是压缩后格式,如果需要图片的原始像素数据,请使用rawRgba |
|
|
// 注意:png是压缩后格式,如果需要图片的原始像素数据,请使用rawRgba |
|
|
ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png); |
|
|
ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png); |
|
|
Uint8List pngBytes = byteData.buffer.asUint8List(); |
|
|
Uint8List pngBytes = byteData.buffer.asUint8List(); |
|
|