control_widget

Creator: coderz1093

Last updated:

0 purchases

control_widget Image
control_widget Images

Languages

Categories

Add to Cart

Description:

control widget

Package for make widget controllable

Features #

✅ Move widget (onMove & onEndMove)
✅ Resize widget (onResize & onEndResize)
✅ Resize & Move (onUpdate & onEndUpdate)
❌ Rotate widget (onRotate & onEndRotate)
❌ Add max/min size
❌ Add max/min offset
❌ Add max/min rotate

Getting started #
It's required to use ControllableWidget inside of Stack widget
Usage #
ControllableWidget(
height: height,
width: width,
left: left,
top: top,
onResize: (Size newSize) {
print("Size:$newSize");
height = newSize.height;
width = newSize.width;
},
onMove: (newOffset) {
print("Offset:$newOffset");
left = newOffset.dx;
top = newOffset.dy;
},
onEndResize: (newSize) {
print("Size End :$newSize");
height = newSize.height;
width = newSize.width;
},
onEndMove: (newOffset) {
print("Offset End :$newOffset");
left = newOffset.dx;
top = newOffset.dy;
},
child: ColoredBox(
color: Colors.blue,
child: Center(
child: Text("Item $index"),
),
),
);
copied to clipboard
Full /example
Finally, feel free to contribute or suggest any idea 💡

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.