createBackgroundSkeleton method
Implementation
Skeleton? createBackgroundSkeleton(
Element element,
Rect elementRect,
double width,
) {
final double lineWidth = width;
final Rect parentRectWithBorder = Rect.fromLTWH(
elementRect.left + lineWidth,
elementRect.top + lineWidth,
elementRect.width - lineWidth,
elementRect.height - lineWidth,
);
final Color? color = (element.renderObject as dynamic)?.decoration?.container?.fillColor as Color?;
if (color == null) {
return null;
}
return Skeleton(
color: color,
opacity: color.alpha / 0xFF,
rect: parentRectWithBorder,
);
}