SettingsTile.switchTile constructor

const SettingsTile.switchTile({
  1. Key? key,
  2. required String title,
  3. int? titleMaxLines,
  4. String? subtitle,
  5. int? subtitleMaxLines,
  6. Widget? leading,
  7. bool enabled = true,
  8. Widget? trailing,
  9. required dynamic onToggle(
    1. bool value
    )?,
  10. required bool? switchValue,
  11. TextStyle? titleTextStyle,
  12. TextStyle? subtitleTextStyle,
  13. 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);