ZeroSkeletonListTile constructor

ZeroSkeletonListTile({
  1. Key? key,
  2. bool hasLeading = true,
  3. SkeletonAvatarStyle? leadingStyle,
  4. SkeletonLineStyle? titleStyle = const SkeletonLineStyle(padding: EdgeInsets.all(0), height: 22),
  5. SkeletonLineStyle? subtitleStyle = const SkeletonLineStyle(height: 16, padding: EdgeInsetsDirectional.only(end: 32)),
  6. bool hasSubtitle = false,
  7. EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(vertical: 8),
  8. double? contentSpacing = 8,
  9. double? verticalSpacing = 8,
  10. 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,
            ],
          ),
        ),
      );