OptionEntryTile.toggle constructor
Creates an option row whose trailing action is a Switch.
Implementation
factory OptionEntryTile.toggle({
Key? key,
IconData icon = Icons.adjust_outlined,
required String title,
String? description,
required bool value,
ValueChanged<bool>? onChanged,
Color? color,
Color? borderColor,
}) {
return OptionEntryTile.icon(
key: key,
icon: icon,
title: title,
description: description,
onTap: onChanged == null ? null : () => onChanged(!value),
customActionIcon: Switch(value: value, onChanged: onChanged),
color: color,
borderColor: borderColor,
);
}