nine_image_tools 1.0.2 nine_image_tools: ^1.0.2 copied to clipboard
The flutter 9 image Stretch Fill processing tool.
change Log #
[1.0.2]-2023-03-27 #
解决 .9在部分机型上会出现无法展示的情况 解决 pubspec.yaml会出现assets警告的问题
[1.0.1]-2023-03-27 #
NineImage根据imageProvider解析图片,然后获取到图片的所有像素点,然后遍历找到.9.peg图片黑色像素点,并且记录像素点坐标。
centerSlice
通过此属性进行图片拉升,然后通过padding设置内容填充区域。
注意 #
这里使用centerSlice之后,显示图片的大小大于原图的情况下才可以使用这个属性,要不然会报错.理由是下面这个源码:
assert(sourceSize == inputSize,'centerSlice was used with a BoxFit that does not guarantee that the image is fully visible.')
;
1.使用方式如下:
NineImage(
imageProvider: AssetImage("images/private_bubble_baron.9.png"),
child: Text(
"sadasdasdasdas",
style: TextStyle(color: Colors.white),
),
)