Skip to content

Commit 452d812

Browse files
committed
Rotation #8
1 parent f03e813 commit 452d812

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/flutter_box_transform/lib/src/transformable_box.dart

+2-4
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,12 @@ class _TransformableBoxState extends State<TransformableBox> {
456456
controller.setRect(widget.rect, notify: false, recalculate: false);
457457
}
458458

459-
if (oldWidget.rotation != widget.rotation) {
459+
if (oldWidget.rotation != widget.rotation || widget.rotation != controller.rotation) {
460460
controller.setRotation(widget.rotation, notify: false);
461461
}
462462

463-
if (oldWidget.bindingStrategy != widget.bindingStrategy) {
463+
if (oldWidget.flip != widget.flip || widget.flip != controller.flip) {
464464
controller.setBindingStrategy(widget.bindingStrategy, notify: false);
465-
shouldRecalculatePosition = true;
466-
shouldRecalculateSize = true;
467465
}
468466

469467
if (oldWidget.flip != widget.flip || widget.flip != controller.flip) {

0 commit comments

Comments
 (0)