我有一个代码(最初不是我编写的),在尝试更新它时,我收到此错误:
ui.encodePng(temp) "The argument type 'List<int>' can't be assigned to the parameter type 'Uint8List'"
Run Code Online (Sandbox Code Playgroud)
这是基本代码:
// create crop image for each block
ui.Image temp = ui.copyCrop(
fullImage,
xAxis.round(),
yAxis.round(),
widthPerBlockTemp.round(),
heightPerBlockTemp.round(),
);
// get offset for each block show on center base later
Offset offset = Offset(size.width / 2 - widthPerBlockTemp / 2,
size.height / 2 - heightPerBlockTemp / 2);
ImageBox imageBox = new ImageBox(
image: Image.memory(
ui.encodePng(temp),
fit: BoxFit.contain,
),
isDone: false,
offsetCenter: offsetCenter,
posSide: jigsawPosSide,
radiusPoint: minSize,
size: …Run Code Online (Sandbox Code Playgroud)