ZeroSkeletonLine constructor
ZeroSkeletonLine({
- Key? key,
- SkeletonLineStyle style = const SkeletonLineStyle(),
Implementation
ZeroSkeletonLine({Key? key, this.style = const SkeletonLineStyle()})
: super(
key: key,
child: Align(
alignment: style.alignment,
child: Padding(
padding: style.padding,
child: LayoutBuilder(
builder: (context, constraints) {
return Container(
width: ((style.randomLength != null &&
style.randomLength!) ||
(style.randomLength == null &&
(style.minLength != null &&
style.maxLength != null)))
? doubleInRange(
style.minLength ??
((style.maxLength ?? constraints.maxWidth) /
3),
style.maxLength ?? constraints.maxWidth)
: style.width,
height: style.height,
decoration: BoxDecoration(
color: context.theme.scaffoldBackgroundColor,
borderRadius: style.borderRadius,
),
);
},
)),
),
);