draft_widget 1.1.0 draft_widget: ^1.1.0 copied to clipboard
Flutter widget to draft widgets, transform their position, scale and rotation.
draft_widget #
Flutter widget to draft widgets
Features #
- Translate
- Scale
- Rotate
- Visibility
Getting started #
dependencies:
draft_widget: ^1.1.0
Usage #
DraftWidget(
sketch: {
2: {
'position': const Rect.fromLTWH(100, 100, 100, 100),
'widget': const ColoredBox(color: Colors.red),
'angle': pi / 2,
},
1: {
'position': const Rect.fromLTWH(150, 150, 200, 200),
'widget': Image.asset('images/ending_dash.png'),
'angle': pi / 4,
},
3: {
'position': const Rect.fromLTWH(200, 200, 50, 50),
'widget': const ColoredBox(color: Colors.blue),
},
4: {
'position': const Rect.fromLTWH(200, 200, 50, 50),
'widget': const ColoredBox(color: Colors.blue),
'visibility': false,
},
},
);
Additional information #
Feel free to give feedback.