ZeroSkeletonListTile constructor
ZeroSkeletonListTile({
- Key? key,
- bool hasLeading = true,
- SkeletonAvatarStyle? leadingStyle,
- SkeletonLineStyle? titleStyle = const SkeletonLineStyle(padding: EdgeInsets.all(0), height: 22),
- SkeletonLineStyle? subtitleStyle = const SkeletonLineStyle(height: 16, padding: EdgeInsetsDirectional.only(end: 32)),
- bool hasSubtitle = false,
- EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(vertical: 8),
- double? contentSpacing = 8,
- double? verticalSpacing = 8,
- Widget? trailing,
Implementation
ZeroSkeletonListTile({
Key? key,
this.hasLeading = true,
this.leadingStyle, // = const SkeletonAvatarStyle(padding: EdgeInsets.all(0)),
this.titleStyle = const SkeletonLineStyle(
padding: EdgeInsets.all(0),
height: 22,
),
this.subtitleStyle = const SkeletonLineStyle(
height: 16,
padding: EdgeInsetsDirectional.only(end: 32),
),
this.hasSubtitle = false,
this.padding = const EdgeInsets.symmetric(vertical: 8),
this.contentSpacing = 8,
this.verticalSpacing = 8,
this.trailing,
}) : super(
key: key,
child: Padding(
padding: padding ?? EdgeInsets.zero,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
if (hasLeading)
ZeroSkeletonAvatar(
style: leadingStyle ?? const SkeletonAvatarStyle(),
),
SizedBox(
width: contentSpacing,
),
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
ZeroSkeletonLine(
style: titleStyle ?? const SkeletonLineStyle(),
),
if (hasSubtitle) ...[
SizedBox(
height: verticalSpacing,
),
ZeroSkeletonLine(
style: subtitleStyle ?? const SkeletonLineStyle(),
),
]
],
),
),
if (trailing != null) trailing,
],
),
),
);