NineGridView(
margin: EdgeInsets.all(12),
padding: EdgeInsets.all(5),
space: 5,
type: NineGridType.weChatGp,
itemCount: itemCount,
itemBuilder: (BuildContext context, int index) {},
);
2、拖拽九宫格图片控件 [DragSortView](()
类似微博/微信发布动态九宫格,支持按压放大效果,拖拽排序,拖拽到指定位置删除。
DragSortView(
imageList,
space: 5,
margin: EdgeInsets.all(20),
padding: EdgeInsets.all(0),
itemBuilder: (BuildContext context, int index) {},
initBuilder: (BuildContext context) {},
onDragListener: (MotionEvent event, double itemWidth) {
/// 判断拖动到指定位置删除
/// return true;
if (event.globalY > 600) {
return true;
}
return false;
},
);
3、获取图片尺寸 [ImageUtil](()
大图功能必备工具。
Image image = Image(image: CachedNetworkImageProvider(“Url”));
Image imageAsset =