skeletonsFromBorderRect static method
Implementation
static List<Skeleton>? skeletonsFromBorderRect(
Rect elementRect,
Color color,
double width,
) {
if (width.toInt() == 0) {
return null;
}
return [
Skeleton(
rect: Rect.fromLTWH(
elementRect.left,
elementRect.top,
elementRect.width,
width,
),
color: color,
),
Skeleton(
rect: Rect.fromLTWH(
elementRect.left,
elementRect.bottom,
elementRect.width,
width,
),
color: color,
),
Skeleton(
rect: Rect.fromLTWH(
elementRect.left,
elementRect.top,
width,
elementRect.height,
),
color: color,
),
Skeleton(
rect: Rect.fromLTWH(
elementRect.right,
elementRect.top,
width,
elementRect.height,
),
color: color,
),
];
}