Skip to content

Commit 632423d

Browse files
committed
Add compact option for checkboxes
1 parent 6af17b7 commit 632423d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/transformers/node_transformers/passive_checkbox_transformer.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class PassiveCheckboxWidget extends StatelessWidget {
9898

9999
@override
100100
Widget build(BuildContext context) {
101-
final scale = node.basicBoxLocal.width / kCheckboxDefaultSize;
101+
final scale = node.basicBoxLocal.width / (node.properties.compact ? Checkbox.width : kCheckboxDefaultSize);
102102

103103
final bool? value = PropertyValueDelegate.getPropertyValue<bool>(
104104
node,
@@ -107,8 +107,8 @@ class PassiveCheckboxWidget extends StatelessWidget {
107107
) ??
108108
node.value;
109109

110-
return AdaptiveNodeBox(
111-
node: node,
110+
return SizedBox.fromSize(
111+
size: node.basicBoxLocal.size.flutterSize,
112112
child: Transform.scale(
113113
scale: scale,
114114
child: Checkbox(

0 commit comments

Comments
 (0)