getCardDecoration method

BoxDecoration getCardDecoration({
  1. double? elevation,
})

Get card decoration based on theme

Implementation

BoxDecoration getCardDecoration({double? elevation}) {
  return BoxDecoration(
    color: surfaceColor,
    borderRadius: BorderRadius.circular(borderRadius ?? 12.0),
    border: Border.all(color: borderColor ?? const Color(0xFFE2E8F0).withValues(alpha: 0.6)),
    boxShadow: elevation != null && elevation > 0
        ? [
            BoxShadow(
              color: (textColor ?? Colors.black).withValues(alpha: 0.06),
              blurRadius: elevation,
              offset: Offset(0, elevation / 2),
            ),
          ]
        : null,
  );
}