@@ -163,8 +163,20 @@ class CheckboxListTile extends StatelessWidget {
163163 super .key,
164164 required this .value,
165165 required this .onChanged,
166+ this .mouseCursor,
166167 this .activeColor,
168+ this .fillColor,
167169 this .checkColor,
170+ this .hoverColor,
171+ this .overlayColor,
172+ this .splashRadius,
173+ this .materialTapTargetSize,
174+ this .visualDensity,
175+ this .focusNode,
176+ this .autofocus = false ,
177+ this .shape,
178+ this .side,
179+ this .isError = false ,
168180 this .enabled,
169181 this .tileColor,
170182 this .title,
@@ -174,15 +186,10 @@ class CheckboxListTile extends StatelessWidget {
174186 this .secondary,
175187 this .selected = false ,
176188 this .controlAffinity = ListTileControlAffinity .platform,
177- this .autofocus = false ,
178189 this .contentPadding,
179190 this .tristate = false ,
180- this .shape,
181191 this .checkboxShape,
182192 this .selectedTileColor,
183- this .side,
184- this .visualDensity,
185- this .focusNode,
186193 this .onFocusChange,
187194 this .enableFeedback,
188195 }) : assert (tristate || value != null ),
@@ -219,16 +226,98 @@ class CheckboxListTile extends StatelessWidget {
219226 /// {@end-tool}
220227 final ValueChanged <bool ?>? onChanged;
221228
229+ /// The cursor for a mouse pointer when it enters or is hovering over the
230+ /// widget.
231+ ///
232+ /// If [mouseCursor] is a [MaterialStateProperty<MouseCursor>] ,
233+ /// [MaterialStateProperty.resolve] is used for the following [MaterialState] s:
234+ ///
235+ /// * [MaterialState.selected] .
236+ /// * [MaterialState.hovered] .
237+ /// * [MaterialState.disabled] .
238+ ///
239+ /// If null, then the value of [CheckboxThemeData.mouseCursor] is used. If
240+ /// that is also null, then [MaterialStateMouseCursor.clickable] is used.
241+ final MouseCursor ? mouseCursor;
242+
222243 /// The color to use when this checkbox is checked.
223244 ///
224245 /// Defaults to [ColorScheme.secondary] of the current [Theme] .
225246 final Color ? activeColor;
226247
248+ /// The color that fills the checkbox.
249+ ///
250+ /// Resolves in the following states:
251+ /// * [MaterialState.selected] .
252+ /// * [MaterialState.hovered] .
253+ /// * [MaterialState.disabled] .
254+ ///
255+ /// If null, then the value of [activeColor] is used in the selected
256+ /// state. If that is also null, the value of [CheckboxThemeData.fillColor]
257+ /// is used. If that is also null, then the default value is used.
258+ final MaterialStateProperty <Color ?>? fillColor;
259+
227260 /// The color to use for the check icon when this checkbox is checked.
228261 ///
229262 /// Defaults to Color(0xFFFFFFFF).
230263 final Color ? checkColor;
231264
265+ /// {@macro flutter.material.checkbox.hoverColor}
266+ final Color ? hoverColor;
267+
268+ /// The color for the checkbox's [Material] .
269+ ///
270+ /// Resolves in the following states:
271+ /// * [MaterialState.pressed] .
272+ /// * [MaterialState.selected] .
273+ /// * [MaterialState.hovered] .
274+ ///
275+ /// If null, then the value of [activeColor] with alpha [kRadialReactionAlpha]
276+ /// and [hoverColor] is used in the pressed and hovered state. If that is also null,
277+ /// the value of [CheckboxThemeData.overlayColor] is used. If that is also null,
278+ /// then the the default value is used in the pressed and hovered state.
279+ final MaterialStateProperty <Color ?>? overlayColor;
280+
281+ /// {@macro flutter.material.checkbox.splashRadius}
282+ ///
283+ /// If null, then the value of [CheckboxThemeData.splashRadius] is used. If
284+ /// that is also null, then [kRadialReactionRadius] is used.
285+ final double ? splashRadius;
286+
287+ /// {@macro flutter.material.checkbox.materialTapTargetSize}
288+ ///
289+ /// Defaults to [MaterialTapTargetSize.shrinkWrap] .
290+ final MaterialTapTargetSize ? materialTapTargetSize;
291+
292+ /// Defines how compact the list tile's layout will be.
293+ ///
294+ /// {@macro flutter.material.themedata.visualDensity}
295+ final VisualDensity ? visualDensity;
296+
297+
298+ /// {@macro flutter.widgets.Focus.focusNode}
299+ final FocusNode ? focusNode;
300+
301+ /// {@macro flutter.widgets.Focus.autofocus}
302+ final bool autofocus;
303+
304+ /// {@macro flutter.material.ListTile.shape}
305+ final ShapeBorder ? shape;
306+
307+ /// {@macro flutter.material.checkbox.side}
308+ ///
309+ /// The given value is passed directly to [Checkbox.side] .
310+ ///
311+ /// If this property is null, then [CheckboxThemeData.side] of
312+ /// [ThemeData.checkboxTheme] is used. If that is also null, then the side
313+ /// will be width 2.
314+ final BorderSide ? side;
315+
316+ /// {@macro flutter.material.checkbox.isError}
317+ ///
318+ /// Defaults to false.
319+ final bool isError;
320+
232321 /// {@macro flutter.material.ListTile.tileColor}
233322 final Color ? tileColor;
234323
@@ -270,9 +359,6 @@ class CheckboxListTile extends StatelessWidget {
270359 /// Where to place the control relative to the text.
271360 final ListTileControlAffinity controlAffinity;
272361
273- /// {@macro flutter.widgets.Focus.autofocus}
274- final bool autofocus;
275-
276362 /// Defines insets surrounding the tile's contents.
277363 ///
278364 /// This value will surround the [Checkbox] , [title] , [subtitle] , and [secondary]
@@ -293,9 +379,6 @@ class CheckboxListTile extends StatelessWidget {
293379 /// If tristate is false (the default), [value] must not be null.
294380 final bool tristate;
295381
296- /// {@macro flutter.material.ListTile.shape}
297- final ShapeBorder ? shape;
298-
299382 /// {@macro flutter.material.checkbox.shape}
300383 ///
301384 /// If this property is null then [CheckboxThemeData.shape] of [ThemeData.checkboxTheme]
@@ -306,23 +389,6 @@ class CheckboxListTile extends StatelessWidget {
306389 /// If non-null, defines the background color when [CheckboxListTile.selected] is true.
307390 final Color ? selectedTileColor;
308391
309- /// {@macro flutter.material.checkbox.side}
310- ///
311- /// The given value is passed directly to [Checkbox.side] .
312- ///
313- /// If this property is null, then [CheckboxThemeData.side] of
314- /// [ThemeData.checkboxTheme] is used. If that is also null, then the side
315- /// will be width 2.
316- final BorderSide ? side;
317-
318- /// Defines how compact the list tile's layout will be.
319- ///
320- /// {@macro flutter.material.themedata.visualDensity}
321- final VisualDensity ? visualDensity;
322-
323- /// {@macro flutter.widgets.Focus.focusNode}
324- final FocusNode ? focusNode;
325-
326392 /// {@macro flutter.material.inkwell.onFocusChange}
327393 final ValueChanged <bool >? onFocusChange;
328394
@@ -359,14 +425,20 @@ class CheckboxListTile extends StatelessWidget {
359425 Widget build (BuildContext context) {
360426 final Widget control = Checkbox (
361427 value: value,
362- onChanged: enabled ?? true ? onChanged : null ,
428+ onChanged: enabled ?? true ? onChanged : null ,
429+ mouseCursor: mouseCursor,
363430 activeColor: activeColor,
431+ fillColor: fillColor,
364432 checkColor: checkColor,
365- materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
433+ hoverColor: hoverColor,
434+ overlayColor: overlayColor,
435+ splashRadius: splashRadius,
436+ materialTapTargetSize: materialTapTargetSize ?? MaterialTapTargetSize .shrinkWrap,
366437 autofocus: autofocus,
367438 tristate: tristate,
368439 shape: checkboxShape,
369440 side: side,
441+ isError: isError,
370442 );
371443 Widget ? leading, trailing;
372444 switch (controlAffinity) {
0 commit comments