Skip to content

Commit 8e2bef3

Browse files
committed
Add compact option for checkboxes
1 parent 52fcbb1 commit 8e2bef3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/src/api/nodes/checkbox_node.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ class CheckboxProperties with SerializableMixin, EquatableMixin {
145145
/// Radius of the corners of the checkbox.
146146
late CornerRadius cornerRadius;
147147

148+
/// Whether the checkbox is compact.
149+
late bool compact;
150+
148151
/// Creates a [CheckboxProperties] with the given data.
149152
CheckboxProperties({
150153
this.checkColor = ColorRGBA.white,
@@ -157,6 +160,7 @@ class CheckboxProperties with SerializableMixin, EquatableMixin {
157160
this.cornerRadius = const CornerRadius.all(RadiusModel.circular(3)),
158161
this.splashRadius = kRadialReactionRadius,
159162
this.autofocus = false,
163+
this.compact = false,
160164
});
161165

162166
/// Duplicates this [CheckboxProperties] instance with the given data
@@ -172,6 +176,7 @@ class CheckboxProperties with SerializableMixin, EquatableMixin {
172176
CornerRadius? cornerRadius,
173177
double? splashRadius,
174178
bool? autofocus,
179+
bool? compact,
175180
}) {
176181
return CheckboxProperties(
177182
checkColor: checkColor ?? this.checkColor,
@@ -184,6 +189,7 @@ class CheckboxProperties with SerializableMixin, EquatableMixin {
184189
focusColor: focusColor ?? this.focusColor,
185190
splashRadius: splashRadius ?? this.splashRadius,
186191
autofocus: autofocus ?? this.autofocus,
192+
compact: compact ?? this.compact,
187193
);
188194
}
189195

@@ -199,6 +205,7 @@ class CheckboxProperties with SerializableMixin, EquatableMixin {
199205
focusColor,
200206
splashRadius,
201207
autofocus,
208+
compact,
202209
];
203210

204211
/// Creates a [CheckboxProperties] from a JSON object.

lib/src/api/nodes/checkbox_node.g.dart

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)