Unverified Commit c9ccb177 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Revert "Removed CheckboxListTile accentColor dependency (#76877)" (#76904)

This reverts commit 24bf6b81.
parent 697547c3
...@@ -26,10 +26,10 @@ import 'theme_data.dart'; ...@@ -26,10 +26,10 @@ import 'theme_data.dart';
/// those of the same name on [ListTile]. /// those of the same name on [ListTile].
/// ///
/// The [selected] property on this widget is similar to the [ListTile.selected] /// The [selected] property on this widget is similar to the [ListTile.selected]
/// property, but the color used is [activeColor], if it's non-null. /// property, but the color used is that described by [activeColor], if any,
/// No effort is made to coordinate the [selected] state and the /// defaulting to the accent color of the current [Theme]. No effort is made to
/// [value] state; to have the list tile appear selected when the /// coordinate the [selected] state and the [value] state; to have the list tile
/// checkbox is checked, pass the same value to both. /// appear selected when the checkbox is checked, pass the same value to both.
/// ///
/// The checkbox is shown on the right by default in left-to-right languages /// The checkbox is shown on the right by default in left-to-right languages
/// (i.e. the trailing edge). This can be changed using [controlAffinity]. The /// (i.e. the trailing edge). This can be changed using [controlAffinity]. The
...@@ -314,8 +314,7 @@ class CheckboxListTile extends StatelessWidget { ...@@ -314,8 +314,7 @@ class CheckboxListTile extends StatelessWidget {
/// The color to use when this checkbox is checked. /// The color to use when this checkbox is checked.
/// ///
/// If this property is null, then the checkbox's default is used, which is /// Defaults to accent color of the current [Theme].
/// [ThemeData.toggleableActiveColor].
final Color? activeColor; final Color? activeColor;
/// The color to use for the check icon when this checkbox is checked. /// The color to use for the check icon when this checkbox is checked.
...@@ -431,23 +430,25 @@ class CheckboxListTile extends StatelessWidget { ...@@ -431,23 +430,25 @@ class CheckboxListTile extends StatelessWidget {
trailing = control; trailing = control;
break; break;
} }
return MergeSemantics( return MergeSemantics(
child: ListTile( child: ListTileTheme.merge(
leading: leading, selectedColor: activeColor ?? Theme.of(context).accentColor,
title: title, child: ListTile(
subtitle: subtitle, leading: leading,
trailing: trailing, title: title,
isThreeLine: isThreeLine, subtitle: subtitle,
dense: dense, trailing: trailing,
enabled: onChanged != null, isThreeLine: isThreeLine,
onTap: onChanged != null ? _handleValueChange : null, dense: dense,
selected: selected, enabled: onChanged != null,
autofocus: autofocus, onTap: onChanged != null ? _handleValueChange : null,
contentPadding: contentPadding, selected: selected,
shape: shape, autofocus: autofocus,
selectedTileColor: selectedTileColor, contentPadding: contentPadding,
tileColor: tileColor, shape: shape,
selectedTileColor: selectedTileColor,
tileColor: tileColor,
),
), ),
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment