UiListTile.compact constructor
UiListTile.compact({})
Compact variant for drawers, menus, or dense lists
Implementation
factory UiListTile.compact({
Key? key,
required String title,
String? subtitle,
Widget? leading,
Widget? trailing,
VoidCallback? onTap,
bool enabled = true,
Color? backgroundColor,
TextStyle? titleStyle,
TextStyle? subtitleStyle,
}) {
return UiListTile(
key: key,
title: title,
subtitle: subtitle,
leading: leading,
trailing: trailing,
onTap: onTap,
enabled: enabled,
backgroundColor: backgroundColor,
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
borderRadius: BorderRadius.circular(8),
dense: true,
titleStyle: titleStyle ??
const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
subtitleStyle:
subtitleStyle ?? const TextStyle(fontSize: 12, color: Colors.grey),
);
}