Skip to content

Commit 4933a32

Browse files
SaadArdatiBirjuVachhani
authored andcommitted
❇️ Reformat & Clean up.
1 parent 9983795 commit 4933a32

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

packages/box_transform/lib/src/resizers/resizer.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ import '../geometry.dart';
77
import '../helpers.dart';
88

99
part 'freeform_resizing.dart';
10-
1110
part 'scale_resizing.dart';
12-
1311
part 'symmetric_resizing.dart';
14-
1512
part 'symmetric_scale_resizing.dart';
1613

1714
/// An abstract class the provides a common interface for all resize modes.

packages/box_transform/lib/src/resizers/scale_resizing.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ final class ScaleResizer extends Resizer {
4343
// can't flip it back again. This means that the box might be invalid
4444
// in the first place or something catastrophic happened!!! Contact
4545
// the package author if this happens.
46-
return (rect: initialRect,largest: clampingRect, hasValidFlip: false);
47-
throw StateError('Box found to be invalid more than once!');
46+
return (
47+
rect: initialRect,
48+
largest: result.largest,
49+
hasValidFlip: false
50+
);
4851
}
4952

5053
return newResult;

packages/flutter_box_transform/lib/src/transformable_box.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ class _TransformableBoxState extends State<TransformableBox> {
522522
key: ValueKey(handle),
523523
handlePosition: handle,
524524
handleTapSize: widget.handleTapSize,
525-
enabled: widget.resizable && widget.enabledHandles.contains(handle),
525+
enabled:
526+
widget.resizable && widget.enabledHandles.contains(handle),
526527
onPanStart: (event) => onHandlePanStart(event, handle),
527528
onPanUpdate: (event) => onHandlePanUpdate(event, handle),
528529
onPanEnd: (event) => onHandlePanEnd(event, handle),
@@ -535,7 +536,8 @@ class _TransformableBoxState extends State<TransformableBox> {
535536
key: ValueKey(handle),
536537
handlePosition: handle,
537538
handleTapSize: widget.handleTapSize,
538-
enabled: widget.resizable && widget.enabledHandles.contains(handle),
539+
enabled:
540+
widget.resizable && widget.enabledHandles.contains(handle),
539541
onPanStart: (event) => onHandlePanStart(event, handle),
540542
onPanUpdate: (event) => onHandlePanUpdate(event, handle),
541543
onPanEnd: (event) => onHandlePanEnd(event, handle),

0 commit comments

Comments
 (0)