button static method

Widget button({
  1. double? width,
  2. double height = 48.0,
  3. double borderRadius = 12.0,
  4. EdgeInsetsGeometry? margin,
  5. Color? staticColor,
  6. bool animated = true,
  7. Color? baseColor,
  8. Color? highlightColor,
})

Generates a skeleton block styled like a standard button.

Implementation

static Widget button({
  double? width,
  double height = 48.0,
  double borderRadius = 12.0,
  EdgeInsetsGeometry? margin,
  Color? staticColor,
  bool animated = true,
  Color? baseColor,
  Color? highlightColor,
}) {
  final shape = _buildShape(
    width: width,
    height: height,
    borderRadius: borderRadius,
    margin: margin,
    color: staticColor,
  );
  if (!animated) return shape;
  return RistoShimmer(
    baseColor: baseColor,
    highlightColor: highlightColor,
    child: shape,
  );
}