Flutter 颤振拉深图像';包:image/image.dart抛出错误

Flutter 颤振拉深图像';包:image/image.dart抛出错误,flutter,Flutter,这是错误所在的管线。我有两个图像,nImage和nSign,测试和打印。我只想在另一张上画一张图 print("nImage width${nImage.width} heigth ${nImage.height}"); print("nSign width${nSign.width} heigth ${nSign.height}"); Image savedImage = drawImage( nImage, //dst nSign, //s

这是错误所在的管线。我有两个图像,nImage和nSign,测试和打印。我只想在另一张上画一张图

   print("nImage width${nImage.width} heigth ${nImage.height}");
   print("nSign width${nSign.width} heigth ${nSign.height}");
   Image savedImage =  drawImage(
        nImage, //dst
        nSign, //src
        dstX: 0,
        dstY: 0,
        srcX: 0,
        srcY: 0,
      );
控制台

I/flutter (15153): nImage width4608 heigth 3456
I/flutter (15153): nSign width344 heigth 643
I/flutter (15153): RangeError (index): Index out of range: index should be 
less than 21314: 21314
我应该如何获得drawImage结果? 我需要在图片上的特定位置画上签名 再现错误的完整示例

您好,请提供一个完整的工作代码,可以复制错误。读者需要了解如何定义
nImage
nSign
。我想知道一幅图像是否在另一幅图像上绘制,使得起点在可绘制区域之外,或者可能整个图像需要适合目标以避免出现错误。“可能整个图像需要适合目标以避免出现错误”如何??