@@ -127,6 +127,7 @@ class CheckboxListTile extends StatelessWidget {
127127 required this .onChanged,
128128 this .activeColor,
129129 this .checkColor,
130+ this .enabled,
130131 this .tileColor,
131132 this .title,
132133 this .subtitle,
@@ -295,6 +296,13 @@ class CheckboxListTile extends StatelessWidget {
295296 /// * [Feedback] for providing platform-specific feedback to certain actions.
296297 final bool ? enableFeedback;
297298
299+ /// Whether the CheckboxListTile is interactive.
300+ ///
301+ /// If false, this list tile is styled with the disabled color from the
302+ /// current [Theme] and the [ListTile.onTap] callback is
303+ /// inoperative.
304+ final bool ? enabled;
305+
298306 void _handleValueChange () {
299307 assert (onChanged != null );
300308 switch (value) {
@@ -314,7 +322,7 @@ class CheckboxListTile extends StatelessWidget {
314322 Widget build (BuildContext context) {
315323 final Widget control = Checkbox (
316324 value: value,
317- onChanged: onChanged,
325+ onChanged: enabled ?? true ? onChanged : null ,
318326 activeColor: activeColor,
319327 checkColor: checkColor,
320328 materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
@@ -345,7 +353,7 @@ class CheckboxListTile extends StatelessWidget {
345353 trailing: trailing,
346354 isThreeLine: isThreeLine,
347355 dense: dense,
348- enabled: onChanged != null ,
356+ enabled: enabled ?? onChanged != null ,
349357 onTap: onChanged != null ? _handleValueChange : null ,
350358 selected: selected,
351359 autofocus: autofocus,
0 commit comments