listTileWithSub method
Widget
listTileWithSub(
- String? title,
- BuildContext context,
- String? subtitle, {
- EdgeInsets? padding,
- Color? colorText,
- dynamic onTap()?,
- Widget? leading,
- Widget? trailing,
Implementation
Widget listTileWithSub(
String? title,
BuildContext context,
String? subtitle, {
EdgeInsets? padding,
Color? colorText,
Function()? onTap,
Widget? leading,
Widget? trailing,
}) {
return Material(
color: Colors.transparent,
child: ListTile(
onTap: onTap,
leading: leading,
trailing: trailing ??
Icon(
Icons.chevron_right,
),
tileColor: Theme.of(context).colorScheme.background,
contentPadding: padding ??
EdgeInsets.symmetric(
horizontal: DUI.spacing.lateralPaddingValue, vertical: 0),
title: Text(
title ?? '',
style: TextStyle(
fontSize: DUI.text.regularText,
fontWeight: DUI.text.semiBoldWeight,
color:
colorText ?? Theme.of(context).textTheme.bodyMedium!.color),
),
subtitle: subtitle == null
? null
: Text(
subtitle,
style: TextStyle(
fontSize: DUI.text.smallText,
color: colorText ??
Theme.of(context).textTheme.bodyMedium!.color),
textAlign: TextAlign.start,
),
),
);
}