@@ -77,12 +77,10 @@ class CupertinoSettingsItemState extends State<CupertinoSettingsItem> {
77
77
final isLargeScreen = MediaQuery .of (context).size.width >= 768 ;
78
78
79
79
final ThemeData theme = Theme .of (context);
80
- final ListTileTheme tileTheme = ListTileTheme .of (context);
80
+ final ListTileThemeData tileTheme = ListTileTheme .of (context);
81
81
82
82
final iconThemeData = IconThemeData (
83
- color: widget.enabled
84
- ? _iconColor (theme, tileTheme)
85
- : CupertinoColors .inactiveGray,
83
+ color: widget.enabled ? _iconColor (theme, tileTheme) : CupertinoColors .inactiveGray,
86
84
);
87
85
88
86
Widget ? leadingIcon;
@@ -164,8 +162,7 @@ class CupertinoSettingsItemState extends State<CupertinoSettingsItem> {
164
162
child: CupertinoSwitch (
165
163
value: widget.switchValue! ,
166
164
activeColor: widget.enabled
167
- ? (widget.switchActiveColor ??
168
- Theme .of (context).accentColor)
165
+ ? (widget.switchActiveColor ?? Theme .of (context).accentColor)
169
166
: CupertinoColors .inactiveGray,
170
167
onChanged: ! widget.enabled
171
168
? null
@@ -242,8 +239,7 @@ class CupertinoSettingsItemState extends State<CupertinoSettingsItem> {
242
239
return GestureDetector (
243
240
behavior: HitTestBehavior .opaque,
244
241
onTap: () {
245
- if ((widget.onPress != null || widget.onToggle != null ) &&
246
- widget.enabled) {
242
+ if ((widget.onPress != null || widget.onToggle != null ) && widget.enabled) {
247
243
if (mounted) {
248
244
setState (() {
249
245
pressed = true ;
@@ -295,13 +291,10 @@ class CupertinoSettingsItemState extends State<CupertinoSettingsItem> {
295
291
},
296
292
child: Container (
297
293
decoration: BoxDecoration (
298
- borderRadius:
299
- isLargeScreen ? BorderRadius .all (Radius .circular (20 )) : null ,
294
+ borderRadius: isLargeScreen ? BorderRadius .all (Radius .circular (20 )) : null ,
300
295
color: calculateBackgroundColor (context),
301
296
),
302
- height: widget.subtitle == null && widget.subtitleWidget == null
303
- ? 44.0
304
- : 57.0 ,
297
+ height: widget.subtitle == null && widget.subtitleWidget == null ? 44.0 : 57.0 ,
305
298
child: Row (
306
299
children: rowChildren,
307
300
),
@@ -318,7 +311,7 @@ class CupertinoSettingsItemState extends State<CupertinoSettingsItem> {
318
311
? iosPressedTileColorDark
319
312
: iosTileDarkColor;
320
313
321
- Color ? _iconColor (ThemeData theme, ListTileTheme tileTheme) {
314
+ Color ? _iconColor (ThemeData theme, ListTileThemeData tileTheme) {
322
315
if (tileTheme.selectedColor != null ) {
323
316
return tileTheme.selectedColor;
324
317
}
0 commit comments