bgColor function

Color? bgColor(
  1. Color? color,
  2. bool? transparent,
  3. dynamic type
)

Implementation

Color? bgColor(Color? color, bool? transparent, dynamic type) {
  if (color != null && transparent!) {
    return color.withOpacity(0.3);
  } else if (color != null && !transparent!) {
    return color;
  }

  if (color == null && transparent!) {
    return type.withOpacity(0.3);
  } else if (color == null && !transparent!) {
    return type;
  }

  return type;
}