rectanglePlaceholder static method

Widget rectanglePlaceholder({
  1. required BuildContext context,
  2. double? width,
  3. double? height,
  4. double? borderRadius,
})

Builds a simple rectangular shimmer placeholder.

Implementation

static Widget rectanglePlaceholder({
  required BuildContext context,
  double? width,
  double? height,
  double? borderRadius,
}) {
  final theme = UIProTheme.of(context);
  return Container(
    width: width,
    height: height ?? theme.spacingMD,
    decoration: BoxDecoration(
      color: theme.shimmerBaseColor,
      borderRadius: BorderRadius.circular(
        borderRadius ?? theme.effectiveShimmerBorderRadius,
      ),
    ),
  );
}