SettingsTile.switchTile constructor
const
SettingsTile.switchTile({
- Key? key,
- required String title,
- int? titleMaxLines,
- String? subtitle,
- int? subtitleMaxLines,
- Widget? leading,
- bool enabled = true,
- Widget? trailing,
- required dynamic onToggle(
- bool value
- required bool? switchValue,
- TextStyle? titleTextStyle,
- TextStyle? subtitleTextStyle,
- Color? switchActiveColor,
Implementation
const SettingsTile.switchTile({
Key? key,
required this.title,
this.titleMaxLines,
this.subtitle,
this.subtitleMaxLines,
this.leading,
this.enabled = true,
this.trailing,
required this.onToggle,
required this.switchValue,
this.titleTextStyle,
this.subtitleTextStyle,
this.switchActiveColor,
}) : _tileType = _SettingsTileType.switchTile,
onTap = null,
onPressed = null,
iosChevron = null,
iosChevronPadding = null,
assert(titleMaxLines == null || titleMaxLines > 0),
assert(subtitleMaxLines == null || subtitleMaxLines > 0),
super(key: key);